import { ArgsTable, Meta, Story, Canvas } from '@storybook/addon-docs'; import { HStack, Icon, chakra } from '../..'; import { Button, SpotlightMailIcon2, SpotlightMailIcon, SpotlightPlusIcon, } from './button'; import { MailIcon, PlusIcon as SolidPlusIcon } from '@heroicons/react/solid';
This file contains hidden or 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
import { createModel } from 'xstate/lib/model'; | |
import { GeneralInfoFormValues } from '../create-project-screen/project-wizard/project-wizard-steps/general-info-panel'; | |
import { ArtistInfoFormValues } from '../create-project-screen/project-wizard/project-wizard-steps/artist-info-panel'; | |
import { PlaylistFormValues } from '../create-project-screen/project-wizard/project-wizard-steps/playlist-panel'; | |
import { SocialMediaLinksFormValues } from '../create-project-screen/project-wizard/project-wizard-steps/social-media-links-panel'; | |
export interface ProjectWizardContext { | |
currentStepNumber: number; | |
generalInfo: GeneralInfoFormValues; | |
artistInfo: ArtistInfoFormValues; |
This file contains hidden or 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
import { | |
Box, | |
Button, | |
ButtonGroup, | |
CalendarIconSolid, | |
ChevronLeftIconSolid, | |
ChevronRightIconSolid, | |
Divider, | |
Heading, | |
HStack, |
This file contains hidden or 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
import { chakra, HTMLChakraProps, useToken } from '@backstage/spotlight'; | |
export interface TikTokIconProps extends HTMLChakraProps<'svg'> { | |
color?: string; | |
} | |
export function TikTokIcon(props: TikTokIconProps) { | |
const { color = 'currentColor', ...svgProps } = props; | |
const iconColor = useToken('colors', color); |
This file contains hidden or 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
import { capitalize, downTo } from "./helpers"; | |
export class Bottles { | |
song() { | |
return this.verses(99, 0); | |
} | |
verses(from, to) { | |
return downTo(from, to) | |
.map((i) => this.verse(i)) |
This file contains hidden or 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
import React from 'react'; | |
import { act, render, screen, userEvent } from '../../../../testUtils'; | |
import { LocalisationsScreen } from './LocalisationsScreen'; | |
/** | |
* This test makes extensive use of `act` to ensure that hooks are rendered correctly. | |
* @see https://kentcdodds.com/blog/fix-the-not-wrapped-in-act-warning | |
*/ | |
test('allows authors to create a localisation file', async () => { | |
const handleCreateFileButtonClick = jest.fn(); |
This file contains hidden or 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
import React from 'react'; | |
import { act, render, screen, userEvent } from '../../../../testUtils'; | |
import { LocalisationsScreen } from './LocalisationsScreen'; | |
test('allows authors to add new keys for a draft localisation file', async () => { | |
render(<LocalisationsScreen />); | |
const addKeyButton = screen.getByRole('button', { name: 'Add key' }); | |
userEvent.click(addKeyButton); | |
const keyNameInput = screen.getByLabelText('Key name'); |
This file contains hidden or 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
import React from 'react'; | |
import { | |
act, | |
fireEvent, | |
render, | |
screen, | |
userEvent, | |
} from '../../../../testUtils'; | |
import { CreateNewKeyForm } from './CreateNewKeyForm'; |
NewerOlder