Skip to content

Commit a4d147f

Browse files
praneshg239Harness
authored andcommitted
Update StudioCard footer and Accordion focus state (#10803)
* 663541 Update StudioCard footer and Accordion focus state
1 parent 65f06f7 commit a4d147f

5 files changed

Lines changed: 22 additions & 9 deletions

File tree

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@harnessio/ui",
33
"description": "Harness Canary UI component library",
4-
"version": "0.0.271",
4+
"version": "0.0.272",
55
"private": false,
66
"type": "module",
77
"main": "./dist/index.js",

packages/ui/src/components/studio-card/studio-card-types.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ export interface StudioCardHeaderProps {
1515
actions: JSX.Element | null
1616
}
1717

18-
export interface StudioCardFooterProps {
19-
message?: string
20-
}
18+
export interface StudioCardFooterProps {}
2119

2220
export interface StudioCardMessageProps {
2321
message?: string

packages/ui/src/components/studio-card/studio-card.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,16 @@ function Tag({ tagText, icon }: PropsWithChildren<{ tagText: string; icon?: Icon
220220
* Footer Component
221221
* ====================
222222
*/
223-
function Footer({ message }: StudioCardFooterProps): JSX.Element | null {
223+
function Footer({ children }: PropsWithChildren<StudioCardFooterProps>): JSX.Element {
224224
return (
225225
<div className="cn-studio-card-footer">
226-
<Text color="foreground-3" variant="caption-normal">
227-
{message}
228-
</Text>
226+
{typeof children === 'string' ? (
227+
<Text color="foreground-3" variant="caption-normal">
228+
{children}
229+
</Text>
230+
) : (
231+
children
232+
)}
229233
</div>
230234
)
231235
}

packages/ui/tailwind-utils-config/components/accordion.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ export default {
99
gap: 'var(--cn-accordion-sm-card-gap-y)'
1010
},
1111

12+
'.cn-accordion-item-header button': {
13+
'&:focus': {
14+
outline: 'none'
15+
},
16+
17+
'&:focus-visible': {
18+
outline: 'var(--cn-focus)',
19+
'@apply outline-offset-cn-tight': ''
20+
}
21+
},
22+
1223
'&-md': {
1324
minWidth: 'var(--cn-accordion-md-min-width)',
1425
'--cn-accordion-sm-gap': 'var(--cn-accordion-md-gap)',

packages/ui/tailwind-utils-config/components/table-v2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default {
7373
'&:where(.cn-table-v2-highlight-hover) tbody > tr': {
7474
'&:hover, &:has(.cn-table-v2-cell-clickable-block:focus-visible)': {
7575
'&>td': {
76-
backgroundColor: 'var(--cn-bg-2)'
76+
backgroundColor: 'var(--cn-state-hover)'
7777
}
7878
}
7979
},

0 commit comments

Comments
 (0)