This repository was archived by the owner on Sep 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Box] Add border width support #7621
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a719e83
Add border width prop to `Box`
aveline 3c72a2d
Update shape.ts
aveline 5454eba
Export background color aliases from tokens
aveline 092babc
Create Box.stories.tsx
aveline ee3940a
Add `borderColor` to `box`
aveline f891c7a
Roll back border color updates
aveline a4d6f8b
changeset
aveline 61f964b
Merge branch 'main' into box-border
aveline 1dd2c39
Update initial border value and remove border color declarations
aveline 62b7e33
👕 linting
aveline 2e49e56
👕
aveline 42a2f70
Update .changeset/gorgeous-dryers-wash.md
aveline 1a6304b
Update props.json
aveline 0be25da
Update Box.stories.tsx
aveline 011f0a8
Merge branch 'main' into box-border
aveline ee87025
Update props.json
aveline File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@shopify/polaris': minor | ||
'@shopify/polaris-tokens': minor | ||
--- | ||
|
||
- Added border width prop to `Box` | ||
- Exported color token subset alias types from tokens package and remove from `Box` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
import type {ComponentMeta} from '@storybook/react'; | ||
import {Box, Icon} from '@shopify/polaris'; | ||
import {PaintBrushMajor} from '@shopify/polaris-icons'; | ||
|
||
export default { | ||
component: Box, | ||
} as ComponentMeta<typeof Box>; | ||
|
||
export function Default() { | ||
return ( | ||
<Box> | ||
<Icon source={PaintBrushMajor} color="base" /> | ||
</Box> | ||
); | ||
} | ||
|
||
export function BoxWithDarkBorder() { | ||
return ( | ||
<Box background="surface" padding="4" border="dark"> | ||
<Icon source={PaintBrushMajor} color="base" /> | ||
</Box> | ||
); | ||
} | ||
|
||
export function BoxWithBorderRadius() { | ||
return ( | ||
<Box background="surface" padding="4" borderRadius="2"> | ||
<Icon source={PaintBrushMajor} color="highlight" /> | ||
</Box> | ||
); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.