fix color transition issues
This commit is contained in:
parent
56c6b65241
commit
5bbaae13a1
@ -90,7 +90,7 @@ const MancalaApp: FunctionComponent = () => {
|
|||||||
</Routes>
|
</Routes>
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
<FloatingPanel context={context} color={floatingPanelColor} visible={showConnectionState}>
|
<FloatingPanel context={context} color={floatingPanelColor} visible={showConnectionState}>
|
||||||
<span style={{ color: textColorOnBoard }}>{connectionStateText()}</span>
|
<span style={{ color: textColorOnBoard, transition: 'color 0.5s;' }}>{connectionStateText()}</span>
|
||||||
</FloatingPanel>
|
</FloatingPanel>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -18,7 +18,7 @@ const Button: FunctionComponent<{
|
|||||||
<button
|
<button
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
style={{
|
style={{
|
||||||
background: color,
|
backgroundColor: color,
|
||||||
color: textColor,
|
color: textColor,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -28,6 +28,8 @@ const Button: FunctionComponent<{
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
|
transition: color 0.5s;
|
||||||
|
transition: background-color 0.5s;
|
||||||
}
|
}
|
||||||
`}</style>
|
`}</style>
|
||||||
{text}
|
{text}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ const CircularPanel: FunctionComponent<{
|
|||||||
div {
|
div {
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
|
transition: background-color 0.5s;
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -99,7 +99,7 @@ const InfoPanel: FunctionComponent<{
|
|||||||
if (text) {
|
if (text) {
|
||||||
return (
|
return (
|
||||||
<CircularPanel style={style} color={containerColor}>
|
<CircularPanel style={style} color={containerColor}>
|
||||||
<h4 style={{ margin: "0", color: textColor }}>
|
<h4 style={{ margin: "0", color: textColor, transition: 'color 0.5s' }}>
|
||||||
{text}
|
{text}
|
||||||
</h4>
|
</h4>
|
||||||
</CircularPanel>
|
</CircularPanel>
|
||||||
|
|||||||
@ -14,6 +14,7 @@ const PageContainer: FunctionComponent<{ theme: Theme }> = (props) => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 400px;
|
min-height: 400px;
|
||||||
|
transition: background-color 0.5s;
|
||||||
}
|
}
|
||||||
`}</style>
|
`}</style>
|
||||||
{props.children}
|
{props.children}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ const UserStatus: FunctionComponent<{
|
|||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<div style={style} className={layoutMode === "right" ? "flex-rtl" : "flex-ltr"}>
|
<div style={style} className={layoutMode === "right" ? "flex-rtl" : "flex-ltr"}>
|
||||||
<span style={{color: textColorOnBoard}} className='text'>{user.isAnonymous ? context.texts.Anonymous : user.name}</span>
|
<span style={{color: textColorOnBoard, transition: 'color 0.5s'}} className='text'>{user.isAnonymous ? context.texts.Anonymous : user.name}</span>
|
||||||
<Space width='5px' />
|
<Space width='5px' />
|
||||||
<div className={"circle " + (user.isOnline ? "online" : "offline")}></div>
|
<div className={"circle " + (user.isOnline ? "online" : "offline")}></div>
|
||||||
<style jsx>{`
|
<style jsx>{`
|
||||||
@ -39,6 +39,8 @@ const UserStatus: FunctionComponent<{
|
|||||||
min-height: 15px;
|
min-height: 15px;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
border: 2px solid ${context.themeManager.theme.boardColor};
|
border: 2px solid ${context.themeManager.theme.boardColor};
|
||||||
|
transition: background-color 0.5s;
|
||||||
|
transition: color 0.5s;
|
||||||
}
|
}
|
||||||
.flex-rtl {
|
.flex-rtl {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -29,7 +29,7 @@ const StoreView: FunctionComponent<{
|
|||||||
gridRow: gridRow
|
gridRow: gridRow
|
||||||
}}>
|
}}>
|
||||||
{stones}
|
{stones}
|
||||||
<span className="store-stone-count-text" style={{ color: textColor }}>
|
<span className="store-stone-count-text" style={{ color: textColor, transition: 'color 0.5s' }}>
|
||||||
{stones.length}
|
{stones.length}
|
||||||
</span>
|
</span>
|
||||||
<style jsx>{`
|
<style jsx>{`
|
||||||
@ -42,6 +42,7 @@ const StoreView: FunctionComponent<{
|
|||||||
align-content: center;
|
align-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
transition: background-color 0.5s;
|
||||||
}
|
}
|
||||||
.store-stone-count-text {
|
.store-stone-count-text {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@ -13,6 +13,7 @@ const HeaderBar: FunctionComponent<{ color?: string }> = ({children, color }) =>
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
|
transition: background-color 0.5s;
|
||||||
}
|
}
|
||||||
`}</style>
|
`}</style>
|
||||||
</div>)
|
</div>)
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { Context } from '../../context/context';
|
|||||||
|
|
||||||
const HeaderbarTitle: FunctionComponent<{ title: string, color: string }> = ({ title, color }) => {
|
const HeaderbarTitle: FunctionComponent<{ title: string, color: string }> = ({ title, color }) => {
|
||||||
return (
|
return (
|
||||||
<h1 style={{ color: color }} className="header-bar-title">
|
<h1 style={{ color: color, transition: 'color 0.5s' }} className="header-bar-title">
|
||||||
{title}
|
{title}
|
||||||
<style jsx>{`
|
<style jsx>{`
|
||||||
.header-bar-title {
|
.header-bar-title {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user