Skip to content

Commit

Permalink
refactor(frame): update variants to align with guideline
Browse files Browse the repository at this point in the history
  • Loading branch information
WesSouza authored and arturbien committed Aug 5, 2022
1 parent 746e9c0 commit e3c0338
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/Frame/Frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,26 @@ import { CommonStyledProps } from '../types';
type FrameProps = {
children?: React.ReactNode;
shadow?: boolean;
variant?: 'outside' | 'field' | 'inside' | 'well';
} & React.HTMLAttributes<HTMLDivElement> &
} & (
| {
variant?: 'window' | 'button' | 'field' | 'status';
}
| {
/** @deprecated Use 'window', 'button' or 'status' */
variant?: 'outside' | 'inside' | 'well';
}
) &
React.HTMLAttributes<HTMLDivElement> &
CommonStyledProps;

const createFrameStyles = (variant: FrameProps['variant']) => {
switch (variant) {
case 'status':
case 'well':
return css`
${createBorderStyles({ style: 'status' })}
`;
case 'window':
case 'outside':
return css`
${createBorderStyles({ style: 'window' })}
Expand Down

0 comments on commit e3c0338

Please sign in to comment.