-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] Make sample app responsive (#634)
Co-authored-by: Ian Seabock (Centific Technologies Inc) <[email protected]>
- Loading branch information
Showing
13 changed files
with
183 additions
and
110 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 |
---|---|---|
|
@@ -54,3 +54,10 @@ | |
width: 27px; | ||
height: 30px; | ||
} | ||
|
||
|
||
@media (max-width: 480px) { | ||
.questionInputContainer { | ||
left: 16.5%; | ||
} | ||
} |
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,48 @@ | ||
.shareButtonRoot { | ||
width: 86px; | ||
height: 32px; | ||
border-radius: 4px; | ||
background: radial-gradient(109.81% 107.82% at 100.1% 90.19%, #0F6CBD 33.63%, #2D87C3 70.31%, #8DDDD8 100%); | ||
padding: 5px 12px; | ||
margin-right: 20px; | ||
} | ||
|
||
.shareButtonRoot:hover { | ||
background: linear-gradient(135deg, #0F6CBD 0%, #2D87C3 51.04%, #8DDDD8 100%); | ||
} | ||
|
||
.shareButtonRoot span { | ||
font-weight: 600; | ||
font-size: 14px; | ||
line-height: 20px; | ||
color: #FFFFFF; | ||
} | ||
|
||
.shareButtonRoot i, .shareButtonRoot:hover i { | ||
color: #FFFFFF !important; | ||
} | ||
|
||
.historyButtonRoot { | ||
width: 180px; | ||
border: 1px solid #D1D1D1; | ||
} | ||
|
||
.historyButtonRoot:hover { | ||
border: 1px solid #D1D1D1; | ||
} | ||
|
||
.historyButtonRoot:active { | ||
border: 1px solid #D1D1D1; | ||
} | ||
|
||
@media (max-width: 480px) { | ||
.shareButtonRoot { | ||
width: auto; | ||
padding: 5px 8px; | ||
} | ||
|
||
.historyButtonRoot { | ||
width: auto; | ||
padding: 0 8px | ||
} | ||
} |
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,70 +1,31 @@ | ||
import { CommandBarButton, DefaultButton, IButtonProps, IButtonStyles, ICommandBarStyles } from "@fluentui/react"; | ||
import { CommandBarButton, DefaultButton, IButtonProps } from "@fluentui/react"; | ||
|
||
interface ShareButtonProps extends IButtonProps { | ||
onClick: () => void; | ||
} | ||
import styles from './Button.module.css'; | ||
|
||
export const ShareButton: React.FC<ShareButtonProps> = ({onClick}) => { | ||
const shareButtonStyles: ICommandBarStyles & IButtonStyles = { | ||
root: { | ||
width: 86, | ||
height: 32, | ||
borderRadius: 4, | ||
background: 'radial-gradient(109.81% 107.82% at 100.1% 90.19%, #0F6CBD 33.63%, #2D87C3 70.31%, #8DDDD8 100%)', | ||
// position: 'absolute', | ||
// right: 20, | ||
padding: '5px 12px', | ||
marginRight: '20px' | ||
}, | ||
icon: { | ||
color: '#FFFFFF', | ||
}, | ||
rootHovered: { | ||
background: 'linear-gradient(135deg, #0F6CBD 0%, #2D87C3 51.04%, #8DDDD8 100%)', | ||
}, | ||
label: { | ||
fontWeight: 600, | ||
fontSize: 14, | ||
lineHeight: '20px', | ||
color: '#FFFFFF', | ||
}, | ||
}; | ||
|
||
return ( | ||
<CommandBarButton | ||
styles={shareButtonStyles} | ||
iconProps={{ iconName: 'Share' }} | ||
onClick={onClick} | ||
text="Share" | ||
/> | ||
) | ||
interface ButtonProps extends IButtonProps { | ||
onClick: () => void; | ||
text: string | undefined; | ||
} | ||
|
||
interface HistoryButtonProps extends IButtonProps { | ||
onClick: () => void; | ||
text: string; | ||
} | ||
export const ShareButton: React.FC<ButtonProps> = ({ onClick, text }) => { | ||
|
||
export const HistoryButton: React.FC<HistoryButtonProps> = ({onClick, text}) => { | ||
const historyButtonStyles: ICommandBarStyles & IButtonStyles = { | ||
root: { | ||
width: '180px', | ||
border: `1px solid #D1D1D1`, | ||
}, | ||
rootHovered: { | ||
border: `1px solid #D1D1D1`, | ||
}, | ||
rootPressed: { | ||
border: `1px solid #D1D1D1`, | ||
}, | ||
}; | ||
return ( | ||
<CommandBarButton | ||
className={styles.shareButtonRoot} | ||
iconProps={{ iconName: 'Share' }} | ||
onClick={onClick} | ||
text={text} | ||
/> | ||
) | ||
} | ||
|
||
return ( | ||
<DefaultButton | ||
text={text} | ||
iconProps={{ iconName: 'History' }} | ||
onClick={onClick} | ||
styles={historyButtonStyles} | ||
/> | ||
) | ||
export const HistoryButton: React.FC<ButtonProps> = ({ onClick, text }) => { | ||
return ( | ||
<DefaultButton | ||
className={styles.historyButtonRoot} | ||
text={text} | ||
iconProps={{ iconName: 'History' }} | ||
onClick={onClick} | ||
/> | ||
) | ||
} |
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
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
66 changes: 33 additions & 33 deletions
66
static/assets/index-5b6dda77.js → static/assets/index-2ec9a984.js
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
static/assets/index-5b6dda77.js.map → static/assets/index-2ec9a984.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.