Skip to content

Commit f75dd19

Browse files
committed
Changed some components classes to use new theme
1 parent afe2f32 commit f75dd19

11 files changed

+29
-18
lines changed

client/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
"start": "react-scripts start",
2727
"build": "react-scripts build",
2828
"test": "react-scripts test",
29-
"eject": "react-scripts eject",
30-
"postbuild": "purgecss --css build/static/css/*.css --content build/index.html build/static/js/*.js --output build/static/css"
29+
"eject": "react-scripts eject"
3130
},
3231
"eslintConfig": {
3332
"extends": [

client/src/components/Snippets/SnippetCard.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const SnippetCard = (props: Props): JSX.Element => {
5151
>
5252
<Button
5353
text='View'
54-
color='dark'
54+
color='secondary'
5555
small
5656
outline
5757
classes='me-2'
@@ -60,7 +60,12 @@ export const SnippetCard = (props: Props): JSX.Element => {
6060
}}
6161
/>
6262
</Link>
63-
<Button text='Copy code' color='dark' small handler={copyHandler} />
63+
<Button
64+
text='Copy code'
65+
color='secondary'
66+
small
67+
handler={copyHandler}
68+
/>
6469
</div>
6570
</div>
6671
</Card>

client/src/components/Snippets/SnippetCode.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const SnippetCode = (props: Props): JSX.Element => {
88
<textarea
99
className='form-control'
1010
id='code'
11-
rows={13}
11+
rows={16}
1212
value={props.code}
1313
disabled
1414
></textarea>

client/src/components/Snippets/SnippetDetails.tsx

+8-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const SnippetDetails = (props: Props): JSX.Element => {
6666
<div>
6767
{tags.map((tag, idx) => (
6868
<span className='me-2' key={idx}>
69-
<Badge text={tag} color='dark' />
69+
<Badge text={tag} color='light' />
7070
</span>
7171
))}
7272
</div>
@@ -76,7 +76,7 @@ export const SnippetDetails = (props: Props): JSX.Element => {
7676
<div className='d-grid g-2' style={{ rowGap: '10px' }}>
7777
<Button
7878
text='Edit'
79-
color='dark'
79+
color='secondary'
8080
small
8181
outline
8282
handler={() => {
@@ -94,7 +94,12 @@ export const SnippetDetails = (props: Props): JSX.Element => {
9494
outline
9595
handler={() => deleteSnippet(id)}
9696
/>
97-
<Button text='Copy code' color='dark' small handler={copyHandler} />
97+
<Button
98+
text='Copy code'
99+
color='secondary'
100+
small
101+
handler={copyHandler}
102+
/>
98103
</div>
99104
</Card>
100105
);

client/src/components/Snippets/SnippetForm.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export const SnippetForm = (props: Props): JSX.Element => {
183183
<div className='d-grid'>
184184
<Button
185185
text={`${inEdit ? 'Update snippet' : 'Create snippet'}`}
186-
color='dark'
186+
color='secondary'
187187
type='submit'
188188
/>
189189
</div>

client/src/components/Snippets/SnippetPin.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export const SnippetPin = (props: Props): JSX.Element => {
1515
return (
1616
<div onClick={() => toggleSnippetPin(id)} className='cursor-pointer'>
1717
{isPinned ? (
18-
<Icon path={mdiPin} size={0.8} color='#212529' />
18+
<Icon path={mdiPin} size={0.8} color='#20c997' />
1919
) : (
20-
<Icon path={mdiPinOutline} size={0.8} color='#9a9a9a' />
20+
<Icon path={mdiPinOutline} size={0.8} color='#ced4da' />
2121
)}
2222
</div>
2323
);

client/src/components/UI/EmptyState.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { Link } from 'react-router-dom';
22

33
export const EmptyState = (): JSX.Element => {
44
const editorLink = (
5-
<Link to='/editor' className='fw-bold text-decoration-none text-dark'>
5+
<Link to='/editor' className='fw-bold text-success text-decoration-none'>
66
<span>editor</span>
77
</Link>
88
);
99

1010
return (
1111
<div className='col-12 d-flex flex-column align-items-center'>
12-
<h4 className='text-muted'>You currently don't have any snippets</h4>
12+
<h4>You currently don't have any snippets</h4>
1313
<p>Go to the {editorLink} and create one</p>
1414
</div>
1515
);

client/src/components/UI/Layout.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interface Props {
55
export const Layout = (props: Props): JSX.Element => {
66
return (
77
<div className='container-lg px-5'>
8-
<div className='row pt-4'>{props.children}</div>
8+
<div className='row py-4'>{props.children}</div>
99
</div>
1010
);
1111
};

client/src/components/UI/PageHeader.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const PageHeader = <T,>(props: Props<T>): JSX.Element => {
1919
pathname: prevDest,
2020
state: prevState
2121
}}
22-
className='text-decoration-none text-dark'
22+
className='text-decoration-none text-light'
2323
>
2424
&lt;- Go back
2525
</Link>

client/src/containers/Home.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const Home = (): JSX.Element => {
1919
{snippets.some(s => s.isPinned) && (
2020
<Fragment>
2121
<PageHeader title='Pinned snippets' />
22-
<div className='col-12 mb-3'>
22+
<div className='col-12 mt-3'>
2323
<SnippetGrid snippets={snippets.filter(s => s.isPinned)} />
2424
</div>
2525
</Fragment>

client/src/containers/Snippets.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ export const Snippets = (): JSX.Element => {
4444
<span>Total</span>
4545
<span>{snippets.length}</span>
4646
</div>
47+
<hr />
48+
4749
<h5 className='card-title'>Filter by tags</h5>
4850
<Fragment>
4951
{tagCount.map((tag, idx) => {
@@ -53,7 +55,7 @@ export const Snippets = (): JSX.Element => {
5355
<div
5456
key={idx}
5557
className={`d-flex justify-content-between cursor-pointer ${
56-
isActiveFilter && 'text-dark fw-bold'
58+
isActiveFilter && 'text-success'
5759
}`}
5860
onClick={() => filterHandler(tag.name)}
5961
>
@@ -66,7 +68,7 @@ export const Snippets = (): JSX.Element => {
6668
<div className='d-grid mt-3'>
6769
<Button
6870
text='Clear filters'
69-
color='dark'
71+
color='secondary'
7072
small
7173
outline
7274
handler={clearFilterHandler}

0 commit comments

Comments
 (0)