With Props

1import React from 'react';
2import { styled } from '@filbert-js/core';
3
4const Button = styled('button')`
5 background: ${({ primary }) => (primary ? '#1f368f' : 'white')};
6 color: ${({ primary }) => (primary ? 'white' : '#1f368f')};
7 border: solid 1px gray;
8`;
9const Container = styled('div')`
10 display: flex;
11 > * + * {
12 margin-left: 1rem;
13 }
14`;
15
16render(
17 <Container>
18 <Button>This is regular Button.</Button>
19 <Button primary={true}>This is Primary Button.</Button>
20 </Container>,
21);