Skip to content

Commit 36dd49f

Browse files
committed
style: 💄 run Prettier
1 parent 61644c4 commit 36dd49f

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

‎.storybook/vcssom/css5-h.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import {styled} from './css5';
33
const cache = {};
44
const cachedBlock = (useCss, h, tag) => cache[tag] || (cache[tag] = styled(useCss)(h)(tag));
55

6-
export const H = (h, useCss) => (tag, props, ...rest) => {
7-
if (!props || !props.css || typeof tag !== 'string') return h(tag, props, ...rest);
8-
const Block = cachedBlock(useCss, h, tag);
9-
return h(Block, props, ...rest);
10-
};
6+
export const H =
7+
(h, useCss) =>
8+
(tag, props, ...rest) => {
9+
if (!props || !props.css || typeof tag !== 'string') return h(tag, props, ...rest);
10+
const Block = cachedBlock(useCss, h, tag);
11+
return h(Block, props, ...rest);
12+
};

‎.storybook/vcssom/css5.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import * as React from 'react';
22
import {useCss} from './react';
33

4-
export const styled = (useCss) => (h) => (tag) => ({as = tag, css, className, ...rest}) => {
5-
const extraClass = useCss(css);
6-
rest.className = className ? className + ' ' + extraClass : extraClass;
7-
return h(as, rest);
8-
};
4+
export const styled =
5+
(useCss) =>
6+
(h) =>
7+
(tag) =>
8+
({as = tag, css, className, ...rest}) => {
9+
const extraClass = useCss(css);
10+
rest.className = className ? className + ' ' + extraClass : extraClass;
11+
return h(as, rest);
12+
};
913

1014
export const Box = styled(useCss)(React.createElement)('div') as any;
1115
export const Text = styled(useCss)(React.createElement)('span') as any;

‎addon/atoms.d.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export interface Atoms {
4242
*/
4343
z?: CSS.Property.ZIndex;
4444

45-
4645
// Layout (box model)
4746

4847
/**
@@ -141,7 +140,6 @@ export interface Atoms {
141140
*/
142141
tbl?: CSS.Property.TableLayout;
143142

144-
145143
// Flexbox
146144

147145
/**
@@ -204,7 +202,6 @@ export interface Atoms {
204202
*/
205203
as?: CSS.Property.AlignSelf;
206204

207-
208205
// Margins
209206

210207
/**
@@ -329,7 +326,6 @@ export interface Atoms {
329326
*/
330327
padl?: CSS.Property.PaddingLeft<TLength>;
331328

332-
333329
// Borders
334330

335331
/**
@@ -392,7 +388,6 @@ export interface Atoms {
392388
*/
393389
bxsh?: CSS.Property.BoxShadow;
394390

395-
396391
// Colors
397392

398393
/**
@@ -565,7 +560,6 @@ export interface Atoms {
565560
*/
566561
va?: CSS.Property.VerticalAlign<TLength>;
567562

568-
569563
// Pointer
570564

571565
/**
@@ -586,7 +580,6 @@ export interface Atoms {
586580
*/
587581
us?: CSS.Property.UserSelect;
588582

589-
590583
// Animations
591584

592585
/**
@@ -643,7 +636,6 @@ export interface Atoms {
643636
*/
644637
tr?: CSS.Property.Transform;
645638

646-
647639
// SVG
648640

649641
/**
@@ -664,7 +656,6 @@ export interface Atoms {
664656
*/
665657
stl?: CSS.Property.StrokeLinecap;
666658

667-
668659
// Other
669660

670661
/**

0 commit comments

Comments
 (0)