Skip to content

Commit b545502

Browse files
committed
Refactor: index.ts
1 parent b57d51b commit b545502

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

src/components/button/index.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,31 @@
1111
cursor: pointer;
1212
user-select: none;
1313

14+
&[class*="--primary"] {
15+
background-color: #f6f8fa;
16+
box-shadow: 0px 1px 0px 0px #1f23280a;
17+
border-color: #d1d9e0;
18+
color: #25292e;
19+
}
20+
1421
&[class*="--default"] {
1522
background-color: #f6f8fa;
1623
box-shadow: 0px 1px 0px 0px #1f23280a;
1724
border-color: #d1d9e0;
1825
color: #25292e;
1926
}
27+
28+
&[class*="--invisible"] {
29+
background-color: #f6f8fa;
30+
box-shadow: 0px 1px 0px 0px #1f23280a;
31+
border-color: #d1d9e0;
32+
color: #25292e;
33+
}
34+
35+
&[class*="--danger"] {
36+
background-color: #f6f8fa;
37+
box-shadow: 0px 1px 0px 0px #1f23280a;
38+
border-color: #d1d9e0;
39+
color: #25292e;
40+
}
2041
}

src/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * as button from './button/index.ts'

src/render/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { render } from '@solid-js/web';
22
import { HashRouter, Route } from '@solid-js/router'
3-
import { Button } from '../components/button/index.ts';
3+
import { button } from '../components/index.ts';
44
import './index.css'
55

66

77
render(
88
() => <HashRouter>
9-
<Route path='/button' component={() => <Button>Hello</Button>}/>
9+
<Route path='/button' component={() => <button.Button>Hello</button.Button>}/>
1010
</HashRouter>,
1111
globalThis.document.body
1212
);

0 commit comments

Comments
 (0)