Skip to content

Commit

Permalink
refactor: optimize TuneSelectorButton rendering in TextField component
Browse files Browse the repository at this point in the history
  • Loading branch information
schettn authored Jun 24, 2024
1 parent 269abf6 commit bced0db
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions packages/jaen/src/fields/TextField/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,20 +306,18 @@ export const TextField = connectField<string, TextFieldProps>(
</Button>,
...(isRTF
? [
<>
<TuneSelectorButton
key={`jaen-highlight-tooltip-tune-${jaenField.name}`}
aria-label="Customize"
tunes={[styleTune, ...fieldStyleTunes]}
icon={
<Text as="span" fontSize="sm" fontFamily="serif">
T
</Text>
}
activeTunes={tunes.activeTunes}
onTune={jaenField.tune}
/>
</>
<TuneSelectorButton
key={`jaen-highlight-tooltip-tune-${jaenField.name}`}
aria-label="Customize"
tunes={[styleTune, ...fieldStyleTunes]}
icon={
<Text as="span" fontSize="sm" fontFamily="serif">
T
</Text>
}
activeTunes={tunes.activeTunes}
onTune={jaenField.tune}
/>
]
: []),
<TuneSelectorButton
Expand Down

0 comments on commit bced0db

Please sign in to comment.