Skip to content

Commit

Permalink
fixup! Handle outline styling using box-shadow in a central place
Browse files Browse the repository at this point in the history
  • Loading branch information
Mykola Harmash committed Jun 3, 2021
1 parent 7083652 commit ae2f4b3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .changeset/hot-cheetahs-press.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@sumup/circuit-ui': minor
'@sumup/circuit-ui': major
---

- Add `size` prop to `Selector`
Expand Down
2 changes: 1 addition & 1 deletion packages/circuit-ui/components/Selector/Selector.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Selector component supports 3 different sizes:

- **mega**, the default size
- **kilo**, used when there are sizing constraints
- **flexible**, used for more complex content within selector which may define it's own margins. **flexible** just adds a minimal equal margin on all sides.
- **flexible**, used for more complex content within selector which may define its own margins. **flexible** just adds a minimal equal margin on all sides.

<Story id="forms-selector--sizes" />

Expand Down
4 changes: 1 addition & 3 deletions packages/circuit-ui/components/Selector/Selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ type LabelElProps = { hasFocus: boolean } & Pick<
'disabled' | 'noMargin' | 'size' | 'checked'
>;

const LABEL_BORDER_RADIUS = '8px';

const outlineStyles = ({
theme,
checked,
Expand Down Expand Up @@ -118,7 +116,7 @@ const baseStyles = ({ theme, checked }: StyleProps & LabelElProps) => css`
position: relative;
margin-bottom: ${theme.spacings.mega};
border: none;
border-radius: ${LABEL_BORDER_RADIUS};
border-radius: ${theme.borderRadius.tera};
transition: box-shadow 0.1s ease-in-out;
${textMega({ theme })};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface SelectorGroupProps {
*/
multiple?: boolean;
/**
* Whether to layout Selectors in a row or a column. Default: 'vertical'.
* Whether to layout Selectors in a row or a column. Default: 'horizontal'.
*/
orientation?: 'vertical' | 'horizontal';
/**
Expand Down

0 comments on commit ae2f4b3

Please sign in to comment.