Skip to content

Commit 5098202

Browse files
committed
fix(ui-buttons): fix seondary ai iconbutton when shape is circle
INSTUI-4691
1 parent eb3f47e commit 5098202

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

packages/ui-buttons/src/BaseButton/styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ const generateStyle = (
388388
? {
389389
borderRadius: `calc(${componentTheme.borderRadius} + ${componentTheme.borderWidth})`
390390
}
391-
: {})
391+
: { borderRadius: '50%' })
392392
}
393393
}
394394
: {})

packages/ui-buttons/src/Button/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ type: example
4242
<Button color="ai-primary" renderIcon={IconAiSolid} margin="small">AI Primary</Button>
4343
<Button color="ai-secondary" renderIcon={IconAiColoredSolid} margin="small">AI Secondary</Button>
4444
<IconButton color="ai-primary" screenReaderLabel="AI button" margin="small"><IconAiSolid/></IconButton>
45+
<IconButton shape='circle' color="ai-secondary" screenReaderLabel="AI button" margin="small"><IconAiColoredSolid/></IconButton>
46+
<IconButton shape='circle' color="ai-primary" screenReaderLabel="AI button" margin="small"><IconAiSolid/></IconButton>
4547
<IconButton color="ai-secondary" screenReaderLabel="AI button" margin="small"><IconAiColoredSolid/></IconButton>
4648
</View>
4749
```

regression-test/src/app/button/page.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,22 @@ export default function ButtonPage() {
155155
</View>
156156
<View display="inline-block" background="primary-inverse">
157157
<IconButton
158-
withBackground={false}
159-
withBorder={false}
160-
color="primary-inverse"
161-
screenReaderLabel="Delete tag"
162-
margin="large"
158+
shape="circle"
159+
color="ai-secondary"
160+
screenReaderLabel="AI button"
161+
margin="small"
163162
>
164-
<IconXSolid />
163+
<IconAiColoredSolid />
164+
</IconButton>
165+
</View>
166+
<View display="inline-block" background="primary-inverse">
167+
<IconButton
168+
shape="circle"
169+
color="ai-primary"
170+
screenReaderLabel="AI button"
171+
margin="small"
172+
>
173+
<IconAiSolid />
165174
</IconButton>
166175
</View>
167176
</div>

0 commit comments

Comments
 (0)