mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-01 01:18:10 +02:00
https://linear.app/unleash/issue/2-1027/adjustments https://linear.app/unleash/issue/2-989/add-imagegif-to-some-of-the-steps Includes small adjustments from the tasks above: - Adjust zIndex values for the demo guide; - Add a screenshot to better guide the users to their `userId` in the demo website; Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item: #3537
64 lines
1.8 KiB
TypeScript
64 lines
1.8 KiB
TypeScript
import { Button, styled } from '@mui/material';
|
|
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
|
|
|
const StyledBanner = styled('div')(({ theme }) => ({
|
|
position: 'sticky',
|
|
top: 0,
|
|
zIndex: theme.zIndex.sticky,
|
|
display: 'flex',
|
|
gap: theme.spacing(1),
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
backgroundColor: theme.palette.web.main,
|
|
color: theme.palette.web.contrastText,
|
|
padding: theme.spacing(1),
|
|
}));
|
|
|
|
const StyledButton = styled(Button)(({ theme }) => ({
|
|
whiteSpace: 'nowrap',
|
|
flexShrink: 0,
|
|
'&&&': {
|
|
fontSize: theme.fontSizes.smallBody,
|
|
},
|
|
}));
|
|
|
|
const StyledQuestionsButton = styled(StyledButton)(({ theme }) => ({
|
|
color: theme.palette.web.contrastText,
|
|
border: `1px solid rgba(255, 255, 255, 0.5)`,
|
|
})) as typeof Button;
|
|
|
|
interface IDemoBannerProps {
|
|
onPlans: () => void;
|
|
}
|
|
|
|
export const DemoBanner = ({ onPlans }: IDemoBannerProps) => {
|
|
const { trackEvent } = usePlausibleTracker();
|
|
|
|
return (
|
|
<StyledBanner>
|
|
<span>
|
|
This is a <strong>demo of Unleash</strong>. Play around as much
|
|
as you want. Reach out when you're ready.
|
|
</span>
|
|
<StyledQuestionsButton
|
|
variant="outlined"
|
|
sx={{ ml: 1 }}
|
|
href="https://slack.unleash.run/"
|
|
target="_blank"
|
|
onClick={() => {
|
|
trackEvent('demo', {
|
|
props: {
|
|
eventType: 'ask_questions',
|
|
},
|
|
});
|
|
}}
|
|
>
|
|
Ask questions
|
|
</StyledQuestionsButton>
|
|
<StyledButton variant="contained" color="primary" onClick={onPlans}>
|
|
Get started
|
|
</StyledButton>
|
|
</StyledBanner>
|
|
);
|
|
};
|