Skip to content

Commit

Permalink
Merge branch 'tsc-build'
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Aug 7, 2024
2 parents 082ad86 + daac879 commit 1caf0b2
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@i-vresse/haddock3-ui",
"version": "0.1.6",
"version": "0.1.7",
"type": "module",
"private": false,
"sideEffects": false,
Expand All @@ -15,7 +15,7 @@
},
"scripts": {
"dev": "ladle serve",
"build": "tsc --project tsconfig.build.json && node build.mjs",
"build": "tsc --project tsconfig.build.json && node build.mjs && pnpm format package.json",
"typecheck": "tsc --noEmit",
"docs:ladle": "ladle build",
"docs:api": "typedoc",
Expand Down Expand Up @@ -55,7 +55,7 @@
"vitest": "^2.0.5"
},
"files": ["dist", "src"],
"module": "dist/ndex.js",
"module": "dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"./CopyToClipBoardIcon": {
Expand Down
55 changes: 55 additions & 0 deletions src/ResiduesSelect.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,58 @@ export const ResnameAsLabel: Story = () => {
/>
);
};

export const ResnameOrSeqAsLabel: Story = () => {
const { globalState } = useLadleContext();
const [selected, setSelected] = useState<ResidueNeighbourSelection>({
act: [3],
pass: [1],
neighbours: [],
});

const onChange = (selected: ResidueSelection) => {
setSelected({
...selected,
neighbours: [],
});
};

return (
<ResiduesSelect
showActive={true}
showPassive={true}
highlight={undefined}
options={[
{
resno: 1,
resname: "A",
seq: "A",
surface: true,
},
{
resno: 2,
resname: "T",
seq: "T",
surface: true,
},
{
resno: 3,
resname: "IML",
seq: "X",
surface: true,
},
{
resno: 4,
resname: "IP1",
seq: "X",
surface: true,
},
]}
selected={selected}
onChange={onChange}
onHover={action("onHover")}
theme={globalState.theme === "dark" ? "dark" : "light"}
/>
);
};
// TODO align checkboxes vertically

0 comments on commit 1caf0b2

Please sign in to comment.