Skip to content

Commit

Permalink
docs(Tile): remove test story
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Apr 12, 2021
1 parent d52f7d2 commit 479fb55
Showing 1 changed file with 1 addition and 80 deletions.
81 changes: 1 addition & 80 deletions packages/react/src/components/Tile/Tile-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import React, { useEffect, useState } from 'react';
import React from 'react';
import { action } from '@storybook/addon-actions';

import {
Expand Down Expand Up @@ -224,82 +224,3 @@ Expandable.parameters = {
`,
},
};

export const Test = () => {
const [selectedTiles, setSelectedTiles] = useState({
tile1: true,
tile2: false,
tile3: false,
tile4: true,
});
useEffect(() => {
console.log(selectedTiles);
});
return (
<div aria-label="selectable tiles" role="group">
<SelectableTile
id="tile1"
name="tiles"
tabIndex={0}
title="title"
value="value"
selected={selectedTiles.tile1}
onClick={() =>
setSelectedTiles({ ...selectedTiles, tile1: !selectedTiles.tile1 })
}>
Tile 1 toggle
</SelectableTile>
<SelectableTile
id="tile2"
name="tiles"
tabIndex={0}
title="title"
value="value"
selected={selectedTiles.tile2}
onClick={() => {
setSelectedTiles({
...selectedTiles,
tile1: true,
tile2: !selectedTiles.tile2,
});
}}>
Tile 1 true, Tile 2 toggle
</SelectableTile>
<SelectableTile
id="tile3"
name="tiles"
tabIndex={0}
title="title"
value="value"
selected={selectedTiles.tile3}
onClick={() =>
setSelectedTiles({
...selectedTiles,
tile1: true,
tile2: true,
tile3: !selectedTiles.tile3,
})
}>
Tile 1 true, Tile 2 true, Tile 3 toggle
</SelectableTile>
<SelectableTile
id="tile4"
name="tiles"
tabIndex={0}
title="title"
value="value"
selected={selectedTiles.tile4}
onClick={() => {
setSelectedTiles({
...selectedTiles,
tile1: true,
tile2: true,
tile3: true,
tile4: true,
});
}}>
All tiles true
</SelectableTile>
</div>
);
};

0 comments on commit 479fb55

Please sign in to comment.