-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
They do not yet change the 3D model, but that is a planned feature.
- Loading branch information
1 parent
3a18d53
commit 70049b4
Showing
8 changed files
with
117 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ export default (props: FrameProps) => { | |
<Material /> | ||
</mesh> | ||
); | ||
}; | ||
}; |
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import { Html } from '@react-three/drei'; | ||
import React from 'react'; | ||
import { TitleCase } from '../../../../helpers/typography'; | ||
import { Box } from '../../../Box/styles'; | ||
import Input from '../../../Input'; | ||
import { book } from '../Book'; | ||
import { SliderProps } from './interface'; | ||
import { Input, Prefix, Suffix } from './styles'; | ||
|
||
export default (props: SliderProps) => { | ||
const { name, value, pos } = props; | ||
return ( | ||
<Html center position={pos}> | ||
<Box> | ||
<Prefix>{TitleCase(name)}</Prefix> | ||
<Input name={name} placeholder={value}></Input> | ||
<Suffix>{TitleCase(book.units)}</Suffix> | ||
</Box> | ||
<Input | ||
name={name} | ||
value={value} | ||
prefix={TitleCase(name)} | ||
suffix={book.units} | ||
></Input> | ||
</Html> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
import React from 'react'; | ||
import { InputProps } from './interface'; | ||
import { Prefix, StyledInput, Suffix, Wrapper } from './styles'; | ||
|
||
export default (props: InputProps) => { | ||
const { prefix, suffix, name, value } = props; | ||
return ( | ||
<Wrapper> | ||
<Prefix>{prefix}</Prefix> | ||
<StyledInput name={name} placeholder={value} /> | ||
<Suffix>{suffix}</Suffix> | ||
</Wrapper> | ||
); | ||
}; |
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,6 @@ | ||
export interface InputProps { | ||
name: string; | ||
value: string; | ||
prefix?: string; | ||
suffix?: string; | ||
} |
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,64 @@ | ||
import styled from 'styled-components'; | ||
export const Wrapper = styled('div')` | ||
border-top: 2px; | ||
border-bottom: 2px; | ||
border-left: 2px; | ||
border-right: 2px; | ||
border-radius: 5px; | ||
border-style: solid; | ||
border-color: grey; | ||
display: flex; | ||
margin-left: 0; | ||
padding-left: 0; | ||
justify-content: space-around; | ||
background-color: white; | ||
width: calc(100% + 2rem); | ||
box-shadow: 3px 3px 2px rgba(0, 0, 0, 0.25); | ||
`; | ||
|
||
export const Prefix = styled('span')` | ||
background-color: grey; | ||
border: 0; | ||
padding-left: 6px; | ||
padding-right: 6px; | ||
pointer-events: none; | ||
-webkit-touch-callout: none; | ||
-webkit-user-select: none; | ||
-khtml-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none; | ||
user-select: none; | ||
`; | ||
export const StyledInput = styled('input')` | ||
border: 0; | ||
border-right-width: 1px; | ||
border-right-color: black; | ||
border-right-style: solid; | ||
border-bottom-width: 1px; | ||
border-bottom-color: black; | ||
border-bottom-style: solid; | ||
margin-top: auto; | ||
margin-bottom: auto; | ||
height: auto; | ||
padding-left: 10px; | ||
padding-right: 10px; | ||
width: calc(100% + 2rem); | ||
margin: 0; | ||
background-color: unset; | ||
padding-top: 3px; | ||
padding-bottom: 3px; | ||
`; | ||
export const Suffix = styled('span')` | ||
border: 0; | ||
background-color: grey; | ||
padding-top: 0; | ||
margin-top: 0; | ||
padding-left: 6px; | ||
padding-right: 6px; | ||
-webkit-touch-callout: none; | ||
-webkit-user-select: none; | ||
-khtml-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none; | ||
user-select: none; | ||
`; |
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