Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
Todo-Storybook
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Madhankumar
Todo-Storybook
Commits
64719727
Commit
64719727
authored
Sep 14, 2023
by
Madhankumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storybook changes
parent
f37d1583
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
14 deletions
+17
-14
db.json
db.json
+0
-7
checkbox.stories.js
src/components/base/checkbox/checkbox.stories.js
+3
-1
index.js
src/components/base/checkbox/index.js
+11
-2
form.stories.js
src/components/top-level/form/form.stories.js
+1
-1
index.js
src/components/top-level/task/index.js
+2
-3
No files found.
db.json
View file @
64719727
...
...
@@ -11,12 +11,6 @@
"title"
:
"helloxxsxsxsxsxsxsxsxsxsxsxsxsxssssssssssssssssssssxssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss"
,
"isCompleted"
:
false
,
"id"
:
2
},
{
"sId"
:
1
,
"title"
:
"hi"
,
"isCompleted"
:
true
,
"id"
:
3
}
]
}
\ No newline at end of file
src/components/base/checkbox/checkbox.stories.js
View file @
64719727
...
...
@@ -3,7 +3,9 @@ import Checkbox from ".";
export
default
{
title
:
"Base/Checkbox"
,
component
:
Checkbox
,
argTypes
:
{
onChange
:
{
action
:
"checked"
}
},
argTypes
:
{
onChange
:
{
action
:
"onChange"
},
},
};
export
const
checkbox
=
{
isCompleted
:
false
,
...
...
src/components/base/checkbox/index.js
View file @
64719727
import
"./checkbox.css"
;
function
Checkbox
({
...
props
})
{
function
Checkbox
({
isCompleted
,
onChange
,
...
props
})
{
const
handleChange
=
()
=>
{
isCompleted
=
!
isCompleted
;
onChange
(
isCompleted
?
"checked"
:
"unchecked"
);
};
return
(
<
div
className
=
"checkbox-bg"
>
<
input
type
=
"checkbox"
name
=
"checkbox"
{...
props
}
/
>
<
input
type
=
"checkbox"
name
=
"checkbox"
onChange
=
{
handleChange
}
{...
props
}
/
>
<
/div
>
);
}
...
...
src/components/top-level/form/form.stories.js
View file @
64719727
...
...
@@ -3,7 +3,7 @@ import Form from ".";
export
default
{
title
:
"Top-Level/Form"
,
component
:
Form
,
argTypes
:
{
onSubmit
:
{
action
:
"Submit"
}
},
argTypes
:
{
onSubmit
:
{
action
:
"
on
Submit"
}
},
};
export
const
form
=
{};
// const Template = (args) => <Form {...args} />;
...
...
src/components/top-level/task/index.js
View file @
64719727
...
...
@@ -17,10 +17,9 @@ function Task({ id, title, isCompleted, onDelete, onChange, onEdit }) {
}
return
false
;
};
const
handleChange
=
(
e
)
=>
{
e
.
preventDefault
();
const
handleChange
=
()
=>
{
isCompleted
=
!
isCompleted
;
onChange
({
id
,
isCompleted
:
isCompleted
?
"checked"
:
"unchecked"
});
onChange
({
id
,
isCompleted
:
isCompleted
?
true
:
false
});
};
const
handleContent
=
(
e
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment