Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
mizdra committed Jun 16, 2024
1 parent 16c3963 commit ff5bab0
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/example/01-basic/1.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@
}
:local(.local_class_name_4) {
}
@value value: #BF4040;
1 change: 1 addition & 0 deletions packages/example/01-basic/1.css.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ declare const styles:
& Readonly<{ "local_class_name_2": string }>
& Readonly<{ "local_class_name_3": string }>
& Readonly<{ "local_class_name_4": string }>
& Readonly<{ "value": string }>
;
export default styles;
//# sourceMappingURL=./1.css.d.ts.map
2 changes: 1 addition & 1 deletion packages/example/01-basic/1.css.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/example/08-value-from/1.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@value value1 from './2.css'; /* single token */
@value value2, value3 from './2.css'; /* multiple tokens */
@value value4 as alias from './2.css'; /* alias */
@value value5 from './2.css'; /* re-exported token */
9 changes: 9 additions & 0 deletions packages/example/08-value-from/1.css.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
declare const styles:
& Readonly<Pick<(typeof import("./2.css"))["default"], "value1">>
& Readonly<Pick<(typeof import("./2.css"))["default"], "value2">>
& Readonly<Pick<(typeof import("./2.css"))["default"], "value3">>
& Readonly<{ "alias": (typeof import("./2.css"))["default"]["value4"] }>
& Readonly<Pick<(typeof import("./3.css"))["default"], "value5">>
;
export default styles;
//# sourceMappingURL=./1.css.d.ts.map
1 change: 1 addition & 0 deletions packages/example/08-value-from/1.css.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/example/08-value-from/2.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@value value1: '';
@value value2: '';
@value value3: '';
@value value4: '';
@value value5 from './3.css';
9 changes: 9 additions & 0 deletions packages/example/08-value-from/2.css.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
declare const styles:
& Readonly<{ "value1": string }>
& Readonly<{ "value2": string }>
& Readonly<{ "value3": string }>
& Readonly<{ "value4": string }>
& Readonly<Pick<(typeof import("./3.css"))["default"], "value5">>
;
export default styles;
//# sourceMappingURL=./2.css.d.ts.map
1 change: 1 addition & 0 deletions packages/example/08-value-from/2.css.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/example/08-value-from/3.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@value value5: '';
5 changes: 5 additions & 0 deletions packages/example/08-value-from/3.css.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare const styles:
& Readonly<{ "value5": string }>
;
export default styles;
//# sourceMappingURL=./3.css.d.ts.map
1 change: 1 addition & 0 deletions packages/example/08-value-from/3.css.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions packages/example/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import styles3 from './03-composes/1.css';
import styles4 from './04-sass/1.scss';
import styles5 from './05-less/1.less';
import styles6 from './06-postcss/1.css';
import styles8 from './08-value-from/1.css';

console.log(styles1.basic);
console.log(styles1.cascading);
Expand All @@ -22,6 +23,7 @@ console.log(styles1.local_class_name_1);
console.log(styles1.local_class_name_2);
console.log(styles1.local_class_name_3);
console.log(styles1.local_class_name_4);
console.log(styles1.value);

console.log(styles2.a);
console.log(styles2.b);
Expand All @@ -44,3 +46,9 @@ console.log(styles5.b_1);
console.log(styles6.a_1);
console.log(styles6.a_2);
console.log(styles6.b);

console.log(styles8.value1);
console.log(styles8.value2);
console.log(styles8.value3);
console.log(styles8.alias);
console.log(styles8.value5);

0 comments on commit ff5bab0

Please sign in to comment.