Skip to content

Commit

Permalink
fix(Artboard): hardcoded sizes (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjitrosch committed Apr 3, 2023
1 parent 27d6c44 commit 57b2b41
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Artboard/Artboard.tsx
Expand Up @@ -6,21 +6,27 @@ import { IComponentBaseProps } from '../types'

export type ArtboardProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps & {
demo?: boolean
size?: 1 | 2 | 3 | 4 | 5 | 6
horizontal?: boolean
}

const Artboard = forwardRef<HTMLDivElement, ArtboardProps>(
(
{ children, size, horizontal, dataTheme, className, ...props },
{ children, demo, size, horizontal, dataTheme, className, ...props },
ref
): JSX.Element => {
const classes = twMerge(
'artboard',
'artboard-demo',
className,
clsx({
[`phone-${size}`]: size,
'artboard-demo': demo,
'phone-1': size === 1,
'phone-2': size === 2,
'phone-3': size === 3,
'phone-4': size === 4,
'phone-5': size === 5,
'phone-6': size === 6,
horizontal: horizontal,
})
)
Expand Down

0 comments on commit 57b2b41

Please sign in to comment.