Skip to content

Commit c8bcc04

Browse files
authored
fix(s2): Remove maxWidth from InlineAlert (#7533)
1 parent fee532d commit c8bcc04

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

.storybook-s2/docs/StyleMacro.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export function StyleMacro() {
130130
<li className={style({font: 'code-xl'})}>code-xl</li>
131131
</ul>
132132
</div>
133-
<InlineAlert variant="notice" styles={style({maxWidth: '[600px]'})}>
133+
<InlineAlert variant="notice" styles={style({maxWidth: 600})}>
134134
<Heading>Important Note</Heading>
135135
<Content>Only use <code className={style({font: 'code-xs', backgroundColor: 'layer-1', paddingX: 2, borderWidth: 1, borderColor: 'gray-100', borderStyle: 'solid', borderRadius: 'sm'})}>{'<Heading>'}</code> and <code className={style({font: 'code-xs', backgroundColor: 'layer-1', paddingX: 2, borderWidth: 1, borderColor: 'gray-100', borderStyle: 'solid', borderRadius: 'sm'})}>{'<Text>'}</code> inside other Spectrum components with predefined styles, such as <code className={style({font: 'code-xs', backgroundColor: 'layer-1', paddingX: 2, borderWidth: 1, borderColor: 'gray-100', borderStyle: 'solid', borderRadius: 'sm'})}>{'<Dialog>'}</code> and <code className={style({font: 'code-xs', backgroundColor: 'layer-1', paddingX: 2, borderWidth: 1, borderColor: 'gray-100', borderStyle: 'solid', borderRadius: 'sm'})}>{'<MenuItem>'}</code>. They do not include any styles by default, and should not be used standalone. Use HTML elements with the style macro directly instead.</Content>
136136
</InlineAlert>

packages/@react-spectrum/s2/src/InlineAlert.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ const inlineAlert = style<InlineStylesProps & {isFocusVisible?: boolean}>({
6060
display: 'inline-block',
6161
position: 'relative',
6262
boxSizing: 'border-box',
63-
maxWidth: 320,
6463
padding: 24,
6564
borderRadius: 'lg',
6665
borderStyle: 'solid',

0 commit comments

Comments
 (0)