-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TextField component to the sistent components page #5948
- Loading branch information
Showing
9 changed files
with
1,425 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import { TextFieldCode } from "../../../../../sections/Projects/Sistent/components/text-field/code"; | ||
|
||
const TextFieldCodePage = () => { | ||
return <TextFieldCode />; | ||
}; | ||
|
||
export default TextFieldCodePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import { TextFieldGuidance } from "../../../../../sections/Projects/Sistent/components/text-field/guidance"; | ||
|
||
const TextFieldGuidancePage = () => { | ||
return <TextFieldGuidance />; | ||
}; | ||
|
||
export default TextFieldGuidancePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import SistentTextField from "../../../../../sections/Projects/Sistent/components/text-field"; | ||
|
||
const SistentTextFieldPage = () => { | ||
return <SistentTextField />; | ||
}; | ||
|
||
export default SistentTextFieldPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/sections/Projects/Sistent/components/text-field/code-block.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React, { useState } from "react"; | ||
import Code from "../../../../../components/CodeBlock"; | ||
export const CodeBlock = ({ name, code }) => { | ||
const [showCode, setShowCode] = useState(false); | ||
const onChange = () => { | ||
setShowCode((prev) => !prev); | ||
}; | ||
return ( | ||
<div className="show-code"> | ||
<input type="checkbox" name={name} id={name} onChange={onChange} /> | ||
<label htmlFor={name} className="label"> | ||
Show Code | ||
</label> | ||
{showCode && ( | ||
<Code codeString={code} language="javascript" /> | ||
)} | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.