Skip to content

Commit 6afa274

Browse files
authored
fix: minor issues and linting (#1092)
1 parent 2d21d5f commit 6afa274

File tree

7 files changed

+18
-39
lines changed

7 files changed

+18
-39
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Refactor internal styled component sub-elements to use tasty `$` selector syntax instead of raw CSS selectors (`'& svg'`, `'& code'`). Remove unused `Postfix` and `ButtonIcon` sub-element styles from `Menu` item styles.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"@react-types/shared": "^3.32.1",
7575
"@tabler/icons-react": "^3.31.0",
7676
"@tanstack/react-virtual": "^3.13.12",
77-
"@tenphi/tasty": "0.14.0",
77+
"@tenphi/tasty": "0.14.2",
7878
"clipboard-copy": "^4.0.1",
7979
"clsx": "^1.1.1",
8080
"diff": "^8.0.3",

pnpm-lock.yaml

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/actions/Menu/Menu.docs.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ Customizes individual menu items.
7474
- `Icon` - Icon element within menu items
7575
- `Text` - Main text content of menu items
7676
- `Description` - Secondary text content for items with descriptions
77-
- `Postfix` - Right-aligned content (shortcuts, badges, etc.)
78-
7977
#### sectionStyles
8078

8179
Customizes section container elements.

src/components/actions/Menu/styled.tsx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -174,32 +174,6 @@ export const StyledItem = tasty({
174174
gap: '.75x',
175175
outline: false,
176176

177-
// Sub-elements reused from MenuButton styles
178-
ButtonIcon: {
179-
display: 'grid',
180-
fontSize: '$icon-size',
181-
width: '$icon-size',
182-
height: '$icon-size',
183-
placeSelf: 'center',
184-
placeItems: 'center',
185-
},
186-
187-
'& [data-element="ButtonIcon"]:first-child:not(:last-child)': {
188-
marginLeft: 0,
189-
},
190-
191-
'& [data-element="ButtonIcon"]:last-child:not(:first-child)': {
192-
marginRight: 0,
193-
},
194-
195-
Postfix: {
196-
color: {
197-
'': '#dark-03',
198-
pressed: '#dark-02',
199-
disabled: '#dark-04',
200-
},
201-
},
202-
203177
Description: {
204178
preset: 't4',
205179
color: '#dark-03',

src/components/content/CopySnippet/CopySnippet.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ const StyledBlock = tasty({
4545
multiline: false,
4646
},
4747

48-
'& code': {
48+
Code: {
49+
$: 'code',
4950
font: {
5051
'': 'monospace',
5152
serif: true,

src/icons/Icon.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ const IconElement = tasty({
2626
textRendering: 'optimizeLegibility',
2727
'-webkit-font-smoothing': 'antialiased',
2828

29-
'& svg': {
29+
Svg: {
30+
$: 'svg',
3031
transition: 'all',
3132
width: 'min 1em',
3233
height: '1em 1em',

0 commit comments

Comments
 (0)