1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-16 11:04:30 +02:00

Add CSS panel

This commit is contained in:
Phuoc Nguyen
2021-03-31 14:49:56 +07:00
parent df9820fb39
commit c6973507c9
94 changed files with 4762 additions and 4739 deletions

View File

@@ -24,81 +24,7 @@ const Details: React.FC<{}> = () => {
</Helmet>
<div className='p-8 pb-20'>
<BrowserFrame
content={(
<div
style={{
alignItems: 'center',
display: 'flex',
flexDirection: 'column',
height: '100%',
justifyContent: 'center',
padding: '8px',
}}
>
<div
style={{
backgroundColor: 'rgba(0, 0, 0, 0.1)',
borderRadius: '9999px',
display: 'inline-flex',
padding: '4px',
}}
>
<label
htmlFor="radio-switch-first"
style={{
backgroundColor: isFirstChecked ? '#357EDD' : '',
borderRadius: '9999px',
color: isFirstChecked ? '#FFF' : '',
cursor: 'pointer',
padding: '16px 8px',
}}
>
<input
id="radio-switch-first"
type="radio"
style={{ display: 'none' }}
checked={isFirstChecked}
onChange={toggle}
/>
<div
style={{
backgroundColor: isFirstChecked ? '#FFF' : 'rgba(0, 0, 0, 0.2)',
borderRadius: '4px',
height: '8px',
width: '64px',
}}
/>
</label>
<label
htmlFor="radio-switch-second"
style={{
backgroundColor: isFirstChecked ? '' : '#357EDD',
borderRadius: '9999px',
color: isFirstChecked ? '' : '#FFF',
cursor: 'pointer',
padding: '16px 8px',
}}
>
<input
id="radio-switch-second"
type="radio"
style={{ display: 'none' }}
checked={!isFirstChecked}
onChange={toggle}
/>
<div
style={{
backgroundColor: isFirstChecked ? 'rgba(0, 0, 0, 0.2)' : '#FFF',
borderRadius: '4px',
height: '8px',
width: '64px',
}}
/>
</label>
</div>
</div>
)}
source={`
html={`
<!-- Container -->
<div style="
background-color: rgba(0, 0, 0, .1);
@@ -126,7 +52,81 @@ const Details: React.FC<{}> = () => {
...
</div>
`}
/>
css={``}
>
<div
style={{
alignItems: 'center',
display: 'flex',
flexDirection: 'column',
height: '100%',
justifyContent: 'center',
padding: '8px',
}}
>
<div
style={{
backgroundColor: 'rgba(0, 0, 0, 0.1)',
borderRadius: '9999px',
display: 'inline-flex',
padding: '4px',
}}
>
<label
htmlFor="radio-switch-first"
style={{
backgroundColor: isFirstChecked ? '#357EDD' : '',
borderRadius: '9999px',
color: isFirstChecked ? '#FFF' : '',
cursor: 'pointer',
padding: '16px 8px',
}}
>
<input
id="radio-switch-first"
type="radio"
style={{ display: 'none' }}
checked={isFirstChecked}
onChange={toggle}
/>
<div
style={{
backgroundColor: isFirstChecked ? '#FFF' : 'rgba(0, 0, 0, 0.2)',
borderRadius: '4px',
height: '8px',
width: '64px',
}}
/>
</label>
<label
htmlFor="radio-switch-second"
style={{
backgroundColor: isFirstChecked ? '' : '#357EDD',
borderRadius: '9999px',
color: isFirstChecked ? '' : '#FFF',
cursor: 'pointer',
padding: '16px 8px',
}}
>
<input
id="radio-switch-second"
type="radio"
style={{ display: 'none' }}
checked={!isFirstChecked}
onChange={toggle}
/>
<div
style={{
backgroundColor: isFirstChecked ? 'rgba(0, 0, 0, 0.2)' : '#FFF',
borderRadius: '4px',
height: '8px',
width: '64px',
}}
/>
</label>
</div>
</div>
</BrowserFrame>
</div>
<section>
<Heading title="Use cases" />