Skip to content

Commit 879fc2b

Browse files
zhpenkovinikolova
authored andcommitted
chore: add colorpalette templates & update tests
1 parent 1d02548 commit 879fc2b

File tree

5 files changed

+24
-20
lines changed

5 files changed

+24
-20
lines changed
+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export * from './colorpalette.spec';
22
export * from './colorpalette-row';
33
export * from './colorpalette-tile';
4+
export * from './templates/colorpalette-normal';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import ColorPalette from "../colorpalette.spec";
2+
3+
export const ColorPaletteNormal = (props) => <ColorPalette {...props} />;

packages/html/src/colorpalette/tests/colorpalette-states.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ColorPalette, ColorPaletteRow, ColorPaletteTile } from '../../colorpalette';
1+
import { ColorPaletteNormal, ColorPaletteRow, ColorPaletteTile } from '../../colorpalette';
22
import { PALETTEPRESETS } from '../colorpalette-presets';
33

44

@@ -8,12 +8,12 @@ export default () =>(
88

99
<span>Disabled</span>
1010
<section>
11-
<ColorPalette palette={PALETTEPRESETS.basic} disabled></ColorPalette>
11+
<ColorPaletteNormal palette={PALETTEPRESETS.basic} disabled></ColorPaletteNormal>
1212
</section>
1313

1414
<span>Item States</span>
1515
<section>
16-
<ColorPalette>
16+
<ColorPaletteNormal>
1717
<ColorPaletteRow>
1818
<ColorPaletteTile color="black" focus></ColorPaletteTile>
1919
<ColorPaletteTile color="grey"></ColorPaletteTile>
@@ -22,7 +22,7 @@ export default () =>(
2222
<ColorPaletteTile color="green" selected></ColorPaletteTile>
2323
<ColorPaletteTile color="blue"></ColorPaletteTile>
2424
</ColorPaletteRow>
25-
</ColorPalette>
25+
</ColorPaletteNormal>
2626
</section>
2727

2828
</div>

packages/html/src/colorpalette/tests/colorpalette-variants.tsx

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ColorPalette } from '../../colorpalette';
1+
import { ColorPaletteNormal } from '../../colorpalette';
22
import { PALETTEPRESETS } from '../colorpalette-presets';
33

44

@@ -12,19 +12,19 @@ export default () =>(
1212
<span>Clarity</span>
1313

1414
<section>
15-
<ColorPalette palette={PALETTEPRESETS.office}></ColorPalette>
15+
<ColorPaletteNormal palette={PALETTEPRESETS.office}></ColorPaletteNormal>
1616
</section>
1717

1818
<section>
19-
<ColorPalette palette={PALETTEPRESETS.apex}></ColorPalette>
19+
<ColorPaletteNormal palette={PALETTEPRESETS.apex}></ColorPaletteNormal>
2020
</section>
2121

2222
<section>
23-
<ColorPalette palette={PALETTEPRESETS.austin}></ColorPalette>
23+
<ColorPaletteNormal palette={PALETTEPRESETS.austin}></ColorPaletteNormal>
2424
</section>
2525

2626
<section>
27-
<ColorPalette palette={PALETTEPRESETS.clarity}></ColorPalette>
27+
<ColorPaletteNormal palette={PALETTEPRESETS.clarity}></ColorPaletteNormal>
2828
</section>
2929

3030
<span>Slipstream</span>
@@ -33,19 +33,19 @@ export default () =>(
3333
<span>Hardcover</span>
3434

3535
<section>
36-
<ColorPalette palette={PALETTEPRESETS.slipstream}></ColorPalette>
36+
<ColorPaletteNormal palette={PALETTEPRESETS.slipstream}></ColorPaletteNormal>
3737
</section>
3838

3939
<section>
40-
<ColorPalette palette={PALETTEPRESETS.metro}></ColorPalette>
40+
<ColorPaletteNormal palette={PALETTEPRESETS.metro}></ColorPaletteNormal>
4141
</section>
4242

4343
<section>
44-
<ColorPalette palette={PALETTEPRESETS.flow}></ColorPalette>
44+
<ColorPaletteNormal palette={PALETTEPRESETS.flow}></ColorPaletteNormal>
4545
</section>
4646

4747
<section>
48-
<ColorPalette palette={PALETTEPRESETS.hardcover}></ColorPalette>
48+
<ColorPaletteNormal palette={PALETTEPRESETS.hardcover}></ColorPaletteNormal>
4949
</section>
5050

5151
<span>Trek</span>
@@ -54,20 +54,20 @@ export default () =>(
5454
<span>Monochrome</span>
5555

5656
<section>
57-
<ColorPalette palette={PALETTEPRESETS.trek}></ColorPalette>
57+
<ColorPaletteNormal palette={PALETTEPRESETS.trek}></ColorPaletteNormal>
5858
</section>
5959

6060
<section>
61-
<ColorPalette palette={PALETTEPRESETS.verve}></ColorPalette>
61+
<ColorPaletteNormal palette={PALETTEPRESETS.verve}></ColorPaletteNormal>
6262
</section>
6363

6464
<section>
6565

66-
<ColorPalette palette={PALETTEPRESETS.basic}></ColorPalette>
66+
<ColorPaletteNormal palette={PALETTEPRESETS.basic}></ColorPaletteNormal>
6767
</section>
6868

6969
<section>
70-
<ColorPalette palette={PALETTEPRESETS.monochrome}></ColorPalette>
70+
<ColorPaletteNormal palette={PALETTEPRESETS.monochrome}></ColorPaletteNormal>
7171
</section>
7272

7373
<span>Custom</span>
@@ -76,7 +76,7 @@ export default () =>(
7676
<span></span>
7777

7878
<section>
79-
<ColorPalette palette={[ "#37399b", "#a81c85", "#0ab3cc", "#2f7d20", "#a21616" ]}></ColorPalette>
79+
<ColorPaletteNormal palette={[ "#37399b", "#a81c85", "#0ab3cc", "#2f7d20", "#a21616" ]}></ColorPaletteNormal>
8080
</section>
8181
</div>
8282
</>

packages/html/src/colorpalette/tests/colorpalette.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ColorPalette } from '../../colorpalette';
1+
import { ColorPaletteNormal } from '../../colorpalette';
22
import { PALETTEPRESETS } from '../colorpalette-presets';
33

44

@@ -8,7 +8,7 @@ export default () =>(
88

99
<span>ColorPalette</span>
1010
<section>
11-
<ColorPalette palette={PALETTEPRESETS.basic}></ColorPalette>
11+
<ColorPaletteNormal palette={PALETTEPRESETS.basic}></ColorPaletteNormal>
1212
</section>
1313

1414
</div>

0 commit comments

Comments
 (0)