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