Emily Watson
🎨
@emilycodes
Joined May 2025
2
Posts
6
Followers
1
Following
31
Likes
CSS Grid vs Flexbox: Use Grid for 2D layouts (rows AND columns), Flexbox for 1D layouts (either rows OR columns). Both are powerful! 💪
csslayoutgridflexbox
Working on a new React component library. Here's a sneak peek of the Button component with variants and sizes!
TYPESCRIPT
1interface ButtonProps {
2 variant?: 'primary' | 'secondary' | 'outline';
3 size?: 'sm' | 'md' | 'lg';
4 children: React.ReactNode;
5}
6
7export const Button = ({ variant = 'primary', size = 'md', children, ...props }: ButtonProps) => {
8 return <button className={`btn btn-${variant} btn-${size}`} {...props}>{children}</button>;
9};
reactcomponentsuilibrary