Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore/test one plugin #568

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import empty from './empty.jpg';
export const useStyles = __styles(
{
root: {
Bcmaq0h: 'fp00rh9',
Bcmaq0h: 'f156c6do',
},
},
{
d: [`.fp00rh9{background-image:url(${_asset}),url(${_asset2});}`],
d: [`.f156c6do{background-image:url(${_asset}),url(${_asset2});}`],
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { __resetStyles } from '@griffel/react';
import blank from './blank.jpg';
import blankDuplicate from './blank.jpg';
import empty from './empty.jpg';
export const useStyles = __resetStyles('ra9m047', null, [
`.ra9m047{background-image:url(${_asset});}`,
`.ra9m047:hover{background-image:url(${_asset});}`,
`.ra9m047:focus{background-image:url(${_asset2});}`,
export const useStyles = __resetStyles('r1lqxq8z', null, [
`.r1lqxq8z{background-image:url(${_asset});}`,
`.r1lqxq8z:hover{background-image:url(${_asset});}`,
`.r1lqxq8z:focus{background-image:url(${_asset2});}`,
]);
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ import empty from './empty.jpg';
export const useStyles = __styles(
{
rootA: {
Bcmaq0h: 'fnwsaxv',
Bcmaq0h: 'f1679hrc',
},
rootB: {
Bcmaq0h: 'fnwsaxv',
Bcmaq0h: 'f1679hrc',
},
rootC: {
Bcmaq0h: 'f1ryfumh',
Bcmaq0h: 'f9o9pwl',
},
assetWithHash: {
Bhu2qc9: 'fv04sme',
Bhu2qc9: 'f1a9657d',
},
},
{
d: [
`.fnwsaxv{background-image:url(${_asset});}`,
`.f1ryfumh{background-image:url(${_asset2});}`,
`.fv04sme{filter:url(${_asset3}#a);}`,
`.f1679hrc{background-image:url(${_asset});}`,
`.f9o9pwl{background-image:url(${_asset2});}`,
`.f1a9657d{filter:url(${_asset3}#a);}`,
],
},
);
14 changes: 14 additions & 0 deletions packages/babel-preset/__fixtures__/css/basic/code.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { makeStyles } from '@griffel/react';

export const styles = makeStyles({
root: {
color: 'red',
paddingLeft: '4px',
},
icon: {
backgroundColor: 'green',
':hover': {
color: 'red',
},
},
});
11 changes: 11 additions & 0 deletions packages/babel-preset/__fixtures__/css/basic/output.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { __css } from '@griffel/react';
export const styles = __css({
root: {
sj55zd: 'fe3e8s9',
uwmqm3: ['fycuoez', 'f8wuabp'],
},
icon: {
De3pzq: 'fcnqdeg',
Bi91k9c: 'faf35ka',
},
});
10 changes: 10 additions & 0 deletions packages/babel-preset/__fixtures__/css/mixed/code.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { makeStyles, makeResetStyles } from '@griffel/react';

export const useClasses = makeStyles({
root: { color: 'red' },
});

export const useClassName = makeResetStyles({
color: 'red',
paddingLeft: '4px',
});
7 changes: 7 additions & 0 deletions packages/babel-preset/__fixtures__/css/mixed/output.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { __css, __resetCSS } from '@griffel/react';
export const useClasses = __css({
root: {
sj55zd: 'fe3e8s9',
},
});
export const useClassName = __resetCSS('rjefjbm', 'r7z97ji');
13 changes: 13 additions & 0 deletions packages/babel-preset/__fixtures__/css/multiple/code.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { makeStyles } from '@griffel/react';

export const stylesA = makeStyles({
root: {
color: 'red',
},
});

export const stylesB = makeStyles({
root: {
backgroundColor: 'green',
},
});
11 changes: 11 additions & 0 deletions packages/babel-preset/__fixtures__/css/multiple/output.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { __css } from '@griffel/react';
export const stylesA = __css({
root: {
sj55zd: 'fe3e8s9',
},
});
export const stylesB = __css({
root: {
De3pzq: 'fcnqdeg',
},
});
6 changes: 6 additions & 0 deletions packages/babel-preset/__fixtures__/css/reset/code.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { makeResetStyles } from '@griffel/react';

export const useClassName = makeResetStyles({
color: 'red',
paddingLeft: '4px',
});
2 changes: 2 additions & 0 deletions packages/babel-preset/__fixtures__/css/reset/output.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { __resetCSS } from '@griffel/react';
export const useClassName = __resetCSS('rjefjbm', 'r7z97ji');
4 changes: 4 additions & 0 deletions packages/babel-preset/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export const configSchema: JSONSchema7 = {

type: 'object',
properties: {
mode: {
type: 'string',
enum: ['aot', 'css-extraction'],
},
classNameHashSalt: {
type: 'string',
},
Expand Down
Loading
Loading