Snippets Collections
import {Icon} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Images/Icon/Old" component={Icon}/>

export const Template = (args) => <Icon {...args} />;

# Icon

This component renders an icon from [heroicons](https://heroicons.com).

**N.B. Changing icon colour via tailwind class does not currently work in storybook previews.** 🚫

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{name: "home", style: "h-5 w-5", colour: "text-black dark:text-white"}}
>
    {Template.bind({})}
</Story>
import {ImageLink} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Images/ImageLink/old" component={ImageLink}/>

export const Template = (args) => <ImageLink {...args} />;

# ImageLink

This component renders an ImageLink which wraps an image with a link and chooses whether to show the dark or light version based of selected theme.

**N.B. Can't swap between themes in stories so you can't see the darkSrc image.** 🚫

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        link: "https://www.spot-ship.com",
        src: "https://dashboard.spot-ship-app.com/Spotship_Light.png",
        darkSrc: "https://dashboard.spot-ship-app.com/Spotship_Dark.png",
        alt: "The spotship logo linking to the spotship website",
    }}
>
    {Template.bind({})}
</Story>
import {DialogButton} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Inputs/DialogButton/old" component={DialogButton}/>

export const Template = (args) => <DialogButton
    children={<div>Example body</div>}
    {...args}
/>;

# DialogButton

This component renders a DialogButton.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        dialogTitle: "Example Title",
        isOpen: false,
        action: () => {
        },
    }}
>
    {Template.bind({})}
</Story>
import {DisclosureButton} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Inputs/DisclosureButton/old" component={DisclosureButton}/>

export const Template = (args) => <DisclosureButton
    children={<div>Example body</div>}
    {...args}
/>;

# Disclosure

This component renders a Disclosure.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        buttonText: "Example Button",
        headerText: "Example Header",
        colour: "Default",
    }}
>
    {Template.bind({})}
</Story>
import {FormAutocompleteField} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta
    title="Components/Inputs/FormAutocompleteField/old"
    component={FormAutocompleteField}
/>

export const Template = (args) => <FormAutocompleteField {...args} />;

# FormAutocompleteField

This component renders an FormAutocompleteField.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        id: "example",
        label: "Label",
        onType: (value) => {
            return value;
        },
        onSelect: (value) => {
            return value;
        },
        options: [
            {id: "1", title: "Mark"},
            {id: "2", title: "Anh"},
            {id: "3", title: "Cosmin"},
            {id: "4", title: "Rafal"},
            {id: "5", title: "Jack"},
        ],
        disabled: false,
        caption: "",
        value: "",
    }}
>
    {Template.bind({})}
</Story>
import {FormAutocompleteMultiselectField} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta
    title="Components/Inputs/FormAutocompleteMultiselectField/old"
    component={FormAutocompleteMultiselectField}
/>

export const Template = (args) => <FormAutocompleteMultiselectField {...args} />;

# FormAutocompleteMultiselectField

This component renders an FormAutocompleteMultiselectField.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        id: "example",
        label: "Label",
        onType: (value) => {
            return value;
        },
        onSelect: (value) => {
            return value;
        },
        options: [
            {id: "1", title: "Mark"},
            {id: "2", title: "Anh"},
            {id: "3", title: "Cosmin"},
            {id: "4", title: "Rafal"},
            {id: "5", title: "Jack"},
        ],
        disabled: false,
        caption: "",
        value: "",
    }}
>
    {Template.bind({})}
</Story>
import {FormCheckboxField} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta
    title="Components/Inputs/FormCheckboxField/old"
    component={FormCheckboxField}
/>

export const Template = (args) => <FormCheckboxField {...args} />;

# FormCheckboxField

This component renders an FormCheckboxField.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        id: "example",
        label: "Label",
        action: () => {
        },
        defaultState: false,
        required: true,
        disabled: false,
        caption: "",
    }}
>
    {Template.bind({})}
</Story>
import {FormDateRangeField} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta
    title="Components/Inputs/FormDateRangeField/old"
    component={FormDateRangeField}
/>

export const Template = (args) => (
    <FormDateRangeField
        {...args}
        value={args.value && args.value !== 0 ? args.value : undefined}
    />
);

# FormDateRangeField

This component renders an FormDateRangeField.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        id: "example",
        label: "Label",
        labelIcon: "funnel",
        placeholder: "Placeholder text",
        value: {
            startDate: new Date(),
            endDate: new Date()
        },
        singleDate: false,
        defaultValue: {
            startDate: new Date(),
            endDate: new Date()
        },
        onChange: () => {
        },
        required: true,
        minLength: 0,
        maxLength: 100,
        pattern: "",
        patternText: "Did not match pattern",
        disabled: false,
        type: "text",
        caption: "",
        warning: true,
        warningDaysInPast: 0,
        warningDaysInFuture: 30,
    }}
>
    {Template.bind({})}
</Story>
import {FormNumberField} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Inputs/FormNumberField/old" component={FormNumberField}/>

export const Template = (args) => (
    <FormNumberField
        {...args}
        value={args.value && args.value !== 0 ? args.value : undefined}
    />
);

# FormNumberField

This component renders an FormNumberField.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        id: "example",
        label: "Label",
        labelIcon: "funnel",
        placeholder: "Placeholder text",
        value: undefined,
        defaultValue: undefined,
        onChange: () => {
        },
        required: true,
        minimum: 0,
        maximum: 100,
        pattern: "",
        patternText: "Did not match pattern",
        step: 0.5,
        disabled: false,
        caption: ""
    }}
>
    {Template.bind({})}
</Story>
import {FormRadioField} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Inputs/FormRadioField/old" component={FormRadioField}/>

export const Template = (args) => <FormRadioField {...args} />;

# FormRadioField

This component renders an FormRadioField.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        id: "example",
        label: "Label",
        labelIcon: "home",
        action: () => {
        },
        value: "Medium",
        radioGroup: ["Small", "Medium", "Big"],
        required: true,
        disabled: false,
        direction: "vertical",
        caption: "",
    }}
>
    {Template.bind({})}
</Story>
import {FormSelectField} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Inputs/FormSelectField/old" component={FormSelectField}/>

export const Template = (args) => <FormSelectField {...args} />;

# FormSelectField

This component renders an FormSelectField.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        id: "example",
        label: "Label",
        labelIcon: "home",
        action: () => {
        },
        defaultValue: "",
        selectGroup: [
            {id: "1", value: "Option1"},
            {id: "2", value: "Option2"},
            {id: "3", value: "Option3"},
        ],
        required: true,
        disabled: false,
        caption: "",
    }}
>
    {Template.bind({})}
</Story>
import {FormTextAreaField} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Inputs/FormTextAreaField/old" component={FormTextAreaField}/>

export const Template = (args) => (
    <FormTextAreaField
        {...args}
        value={args.value && args.value !== 0 ? args.value : undefined}
    />
);

# FormTextAreaField

This component renders a FormTextAreaField.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        id: "example",
        label: "Label",
        labelIcon: "funnel",
        placeholder: "Placeholder text",
        value: undefined,
        defaultValue: undefined,
        onChange: () => {
        },
        required: true,
        minLength: 0,
        maxLength: 10000,
        pattern: "",
        patternText: "Did not match pattern",
        disabled: false,
        type: "text",
        caption: ""
    }}
>
    {Template.bind({})}
</Story>
import {FormTextField} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Inputs/FormTextField/old" component={FormTextField}/>

export const Template = (args) => (
    <FormTextField
        {...args}
        value={args.value && args.value !== 0 ? args.value : undefined}
    />
);

# FormTextField

This component renders an FormTextField.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        id: "example",
        label: "Label",
        labelIcon: "funnel",
        placeholder: "Placeholder text",
        value: undefined,
        defaultValue: undefined,
        onChange: () => {
        },
        required: true,
        minLength: 0,
        maxLength: 100,
        pattern: "",
        patternText: "Did not match pattern",
        disabled: false,
        type: "text",
        caption: ""
    }}
>
    {Template.bind({})}
</Story>
import {FormTimeField} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Inputs/FormTimeField/old" component={FormTimeField}/>

export const Template = (args) => (
    <FormTimeField
        {...args}
        value={args.value && args.value !== 0 ? args.value : undefined}
    />
);

# FormTimeField

This component renders an FormTimeField.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        id: "example",
        label: "Label",
        labelIcon: "funnel",
        placeholder: "Placeholder text",
        value: undefined,
        onChange: () => {
        },
        required: true,
        min: "00:00",
        max: "23:59",
        disabled: false,
        caption: ""
    }}
>
    {Template.bind({})}
</Story>
import {SubmitButton} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Inputs/SubmitButton/old" component={SubmitButton}/>

export const Template = (args) => <SubmitButton {...args} />;

# SubmitButton

This component renders a Submit Button for a form.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        text: "example",
        icon: "home",
        iconRight: false,
        colour: "Primary",
        disabled: false,
    }}
>
    {Template.bind({})}
</Story>
import {ToggleSwitch} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Inputs/ToggleSwitch/old" component={ToggleSwitch}/>

export const Template = (args) => <ToggleSwitch {...args} />;

# ToggleSwitch

This component renders a Toggle Switch.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        id: "Example",
        altText: "example",
        action: () => {
        },
        defaultState: false,
        disabled: false,
        enabledMessage: "Enabled",
        disabledMessage: "Disabled",
    }}
>
    {Template.bind({})}
</Story>
import {Globe} from "ui";
import {ArgsTable, Canvas, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Misc/Globe/old" component={Globe}/>

export const Template = (args) => <Globe {...args} />;

# Globe

Description of a globe

Globe provided by [Cobe](https://cobe.vercel.app)

## Props

<ArgsTable story="Default"/>

## Examples

<Canvas>
    <Story
        name="Default"
        args={{
            rotate: true,
            startingAngle: 0,
            rotateLeftToRight: true,
            speed: 0.005,
            height: 500,
            width: 500,
            markers: [
                {location: [37.7595, -122.4367], size: 0.03},
                {location: [40.7128, -74.006], size: 0.1},
            ],
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>
import {Spinner} from "ui";
import {ArgsTable, Canvas, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Misc/Spinner/old" component={Spinner}/>

export const Template = (args) => <Spinner {...args} />;

# Spinner

Description of a Spinner

## Props

<ArgsTable story="Default"/>

## Examples

<Canvas>
    <Story
        name="Default"
        args={{
            progress: 70,
            size: 1,
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>
import {CommandPalette, MinimalPage} from "ui";
import {ArgsTable, Canvas, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Sections/CommandPalette/old" component={CommandPalette}/>

export const Template = (args) => (
    <MinimalPage pageTitle="Command Palette" pageDescription="" commandPrompt>
        <p> Press command + k or ctrl + k in order to open the command palette.</p>
        <CommandPalette {...args} />
    </MinimalPage>
);

# CommandPalette

Description of a CommandPalette

## Props

<ArgsTable story="Empty"/>

## Examples

<Canvas>
    <Story
        name="Empty"
        args={{
            startOpen: false,
            onType: (value) => {
                return value;
            },
            onSelect: (value) => {
                return value;
            },
            options: [],
            loading: false,
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>

<Canvas>
    <Story
        name="Full"
        args={{
            startOpen: false,
            onType: (value) => {
                return value;
            },
            onSelect: (value) => {
                return value;
            },
            options: [
                {
                    id: "1",
                    title: "Test 1",
                    description: `Multi line string
            Text wrap Test
            testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest
            `,
                },
                {
                    id: "2",
                    title: "Test 2",
                    description: "test",
                },
                {
                    id: "3",
                    title: "Test 3",
                    description: "test",
                },
                {
                    id: "4",
                    title: "Test 4",
                    description: "test",
                },
                {
                    id: "5",
                    title: "Test 5",
                    description: "test",
                },
                {
                    id: "6",
                    title: "Test 6",
                    description: "test",
                },
                {
                    id: "7",
                    title: "Test 7",
                    description: "test",
                },
                {
                    id: "8",
                    title: "Test 8",
                    description: "test",
                },
                {
                    id: "9",
                    title: "Test 9",
                    description: "test",
                },
                {
                    id: "10",
                    title: "Test 10",
                    description: "test",
                },
                {
                    id: "11",
                    title: "Test 11",
                    description: "test",
                },
                {
                    id: "12",
                    title: "Test 12",
                    description: "test",
                },
                {
                    id: "13",
                    title: "Test 13",
                    description: "test",
                },
                {
                    id: "14",
                    title: "Test 14",
                    description: "test",
                }, {
                    id: "15",
                    title: "Test 15",
                    description: "test",
                },
                {
                    id: "15",
                    title: "Test 15",
                    description: "test",
                },
            ],
            loading: false,
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>

<Canvas>
    <Story
        name="Error"
        args={{
            startOpen: false,
            onType: (value) => {
                return value;
            },
            onSelect: (value) => {
                return value;
            },
            options: [],
            error: "There was an error.",
            loading: false,
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>
import {Footer} from "ui";
import {ArgsTable, Canvas, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Sections/Footer/old" component={Footer}/>

export const Template = (args) => <Footer {...args} />;

# Footer

Description of a Footer

## Props

<ArgsTable story="Default"/>

## Examples

<Canvas>
    <Story
        name="Default"
        args={{
            noSession: true,
            links: [
                {
                    icon: "home",
                    text: "Example",
                    href: "https://www.spot-ship.com",
                    removeHover: true,
                },
            ],
            protectedLinks: [
                {
                    icon: "home",
                    text: "Example",
                    href: "https://www.spot-ship.com",
                    removeHover: true,
                },
                {
                    icon: "globe",
                    text: "Example thats only available when logged in",
                    href: "https://www.spot-ship.com",
                    removeHover: true,
                },
            ],
            background: true,
            commandPrompt: true
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>
import {Header} from "ui";
import {ArgsTable, Canvas, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Sections/Header/old" component={Header}/>

export const Template = (args) => <Header {...args} />;

# Header

Description of a Header

## Props

<ArgsTable story="Default"/>

## Examples

<Canvas>
    <Story
        name="Default"
        args={{
            title: "Example header title",
            description: "Example page description",
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>
import {If} from "ui";
import {ArgsTable, Canvas, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Sections/If/old" component={If}/>

export const Template = (args) => (
    <If {...args}>Only shows when condition is true.</If>
);

# If

Description of a If

## Props

<ArgsTable story="Default"/>

## Examples

<Canvas>
    <Story
        name="Default"
        args={{
            condition: true,
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>
import {ArgsTable, Canvas, Meta, Story} from "@storybook/addon-docs";
import {IfElse} from "ui";

<Meta title="Components/Sections/IfElse/old" component={IfElse}/>

export const Template = (args) => (
    <IfElse {...args}>Only shows when condition is true.</IfElse>
);

# If

Description of a IfElse

## Props

<ArgsTable story="Default"/>

## Examples

<Canvas>
    <Story
        name="Default"
        args={{
            condition: true,
            elseChildren: "Else show this"
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>
import {MinimalPage} from "ui";
import {ArgsTable, Canvas, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Sections/MinimalPage/old" component={MinimalPage}/>

export const Template = (args) => <MinimalPage {...args} />;

# MinimalPage

Description of a MinimalPage

## Props

<ArgsTable story="Default"/>

## Examples

<Canvas>
    <Story
        name="Default"
        args={{
            pageTitle: "Example Page",
            pageDescription: "Example page description",
            commandPrompt: true
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>
import {NavBar} from "ui";
import {ArgsTable, Canvas, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Sections/NavBar/old" component={NavBar}/>

export const Template = (args) => <NavBar {...args} />;

# NavBar

Description of a NavBar

## Props

<ArgsTable story="Default"/>

## Examples

<Canvas>
    <Story
        name="Default"
        args={{
            noSession: true,
            links: [
                {
                    icon: "home",
                    text: "Example",
                    href: "https://www.spot-ship.com",
                    removeHover: true,
                },
            ],
            protectedLinks: [
                {
                    icon: "home",
                    text: "Example",
                    href: "https://www.spot-ship.com",
                    removeHover: true,
                },
                {
                    icon: "globe",
                    text: "Example thats only available when logged in",
                    href: "https://www.spot-ship.com",
                    removeHover: true,
                },
            ],
            background: true,
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>
import {Page} from "ui";
import {ArgsTable, Canvas, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Sections/Page/old" component={Page}/>

export const Template = (args) => <Page {...args} />;

# Page

Description of a Page

## Props

<ArgsTable story="Default"/>

## Examples

<Canvas>
    <Story
        name="Default"
        args={{
            pageTitle: "Example Page",
            pageDescription: "Example page description",
            navigation: true,
            noSession: true,
            routes: [
                {
                    icon: "home",
                    text: "Example",
                    href: "https://www.spot-ship.com",
                    removeHover: true,
                },
            ],
            protectedRoutes: [
                {
                    icon: "home",
                    text: "Example",
                    href: "https://www.spot-ship.com",
                    removeHover: true,
                },
                {
                    icon: "globe",
                    text: "Example thats only available when logged in",
                    href: "https://www.spot-ship.com",
                    removeHover: true,
                },
            ],
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>
import {SideBar} from "ui";
import {ArgsTable, Canvas, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Sections/SideBar/old" component={SideBar}/>

export const Template = (args) => <SideBar {...args} />;

# SideBar

Description of a SideBar

## Props

<ArgsTable story="Default"/>

## Examples

<Canvas>
    <Story
        name="Default"
        args={{
            noSession: true,
            links: [
                {
                    icon: "home",
                    text: "Example",
                    href: "https://www.spot-ship.com",
                    removeHover: true,
                },
            ],
            protectedLinks: [
                {
                    icon: "home",
                    text: "Example",
                    href: "https://www.spot-ship.com",
                    removeHover: true,
                },
                {
                    icon: "globe",
                    text: "Available when logged in",
                    href: "https://www.spot-ship.com",
                    removeHover: true,
                },
            ],
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>
import {Alert} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Text/Alert/old" component={Alert}/>

export const Template = (args) => <Alert {...args} />;

# Alert

This component renders an alert.

## Props

<ArgsTable story="Default"/>

## Examples

<Story name="Default" args={{text: "Example", icon: "alarm", level: "Info"}}>
    {Template.bind({})}
</Story>
import {Caption} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Text/Caption/old" component={Caption}/>

export const Template = (args) => <Caption {...args} />;

# Caption

This component renders a styled `<span>` for the main text Caption.

## Props

<ArgsTable story="Default"/>

## Examples

<Story name="Default" args={{text: "Example", inline: false}}>
    {Template.bind({})}
</Story>
import {Content} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Text/Content/old" component={Content}/>

export const Template = (args) => <Content {...args} />;

# Content

This component renders a styled `<span>` for the main text content.

## Props

<ArgsTable story="Default"/>

## Examples

<Story name="Default" args={{text: "Example"}}>
    {Template.bind({})}
</Story>
import {ErrorText} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Text/ErrorText/old" component={ErrorText}/>

export const Template = (args) => <ErrorText {...args} />;

# ErrorText

This component renders a styled `<span>` for any error text.

## Props

<ArgsTable story="Default"/>

## Examples

<Story name="Default" args={{text: "Example"}}>
    {Template.bind({})}
</Story>
import {Heading} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Text/Heading/old" component={Heading}/>

export const Template = (args) => <Heading {...args} />;

# Heading

This component renders a styled `<H2>` and should be used for the most important headings on the page.

## Props

<ArgsTable story="Default"/>

## Examples

<Story name="Default" args={{text: "Example"}}>
    {Template.bind({})}
</Story>
import {HeadingLink} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Text/HeadingLink/old" component={HeadingLink}/>

export const Template = (args) => <HeadingLink {...args} />;

# HeadingLink

This component renders a styled `<H2>` and should be used for the most important headings on the page.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        icon: "home",
        text: "Example",
        href: "https://www.spot-ship.com",
        removeHover: false,
        background: "Info",
        fullWidth: false,
    }}
>
    {Template.bind({})}
</Story>
import {Keyboard} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Text/Keyboard/old" component={Keyboard}/>

export const Template = (args) => <Keyboard {...args} />;

# Keyboard

This component renders a styled `<kbd>` for Keyboard items.

## Props

<ArgsTable story="Default"/>

## Examples

<Story name="Default" args={{text: "ctrl"}}>
    {Template.bind({})}
</Story>
import {PageHeading} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Text/PageHeading/old" component={PageHeading}/>

export const Template = (args) => <PageHeading {...args} />;

# PageHeading

This component renders a styled `<H1>` for the PageHeading.

There should be 1 of these on every page!

## Props

<ArgsTable story="Default"/>

## Examples

<Story name="Default" args={{text: "Example"}}>
    {Template.bind({})}
</Story>
import {Subheading} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Text/Subheading/old" component={Subheading}/>

export const Template = (args) => <Subheading {...args} />;

# Subheading

This component renders a styled `<H3>` for subheadings.

## Props

<ArgsTable story="Default"/>

## Examples

<Story name="Default" args={{text: "Example"}}>
    {Template.bind({})}
</Story>
select advertiser, advertiser_id,'Adjust' as MMP, outcome_ltag 
from advertiser_lookup
where outcome_ltag in (
select distinct(l_tag) from new_pixel
where user_agent ='adjust.com'
and date = '2024-03-22')
union
select advertiser, advertiser_id, 'AppsFlyer' as MMP, outcome_ltag
from advertiser_lookup
where outcome_ltag in (
select distinct(l_tag) from new_pixel
where user_agent ='http-kit/2.0'
and date = '2024-03-22')
union
select advertiser, advertiser_id, 'Singular' as MMP, outcome_ltag
from advertiser_lookup
where outcome_ltag in (
select distinct(l_tag) from new_pixel
where user_agent ='Apsalar-Postback'
and date = '2024-03-22')
union
select advertiser, advertiser_id, 'Kochava' as MMP, outcome_ltag
from advertiser_lookup
where outcome_ltag in (
select distinct(l_tag) from new_pixel
where u11_tag ='Kochava'
and date = '2024-03-22')
order by MMP
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    <id>Cashapp-hack-unlimited-money-adder-hack-software</id>
    <version>1.0.0</version>
    <title>Cash app hack unlimited money $$ cash app money adder hack software</title>
    <authors>Alex</authors>
    <owners></owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Cash app hack unlimited money $$ cash app money adder hack software:
 
VISIT HERE TO HACK >>>>> https://gamedips.xyz/cashapp-new
 
Cash App free money is one of the very searched terms in Google and users are looking to locate techniques for getting free profit their Cash App balance with limited additional effort.Observe that there are numerous different survey and rewards sites that you can participate and get paid in Cash App balance using a number of methods. These easy ways can put balance in your account with a few work.Ways to get free money on Cash App, you can find survey and opinion rewards sites that will help you out. You can get free Cash App money sent to your Cash App wallet if you're using the Cash App payment option. Redeem your points for Cash App.Alternatively, you can even receive a telephone call from someone who claimed to be a Cash App representative. They then sent a text with an url to update your Cash App password. After you enter your real password on the form, the hackers gained full use of your Cash App account.
 
Cash App Hack,cash app hack apk ios,cash app hacked,cash app hack apk,cash app hack 2021,cash app hacks 2020,cash app hack no human verification,cash app hacks that really work,cash app hack wrc madison,cash app hack apk download,cash app hack august 2020,cash app hack april 2020,cash app hack activation code,cash app hack apk 2021,cash app hack april 2021,cash app bitcoin hack,cash app boost hack,big cash app hack,big cash app hack version,big cash app hack mod apk download,big cash app hack 2020,big cash app hack 2019,free bitcoin cash app hack</description>
  </metadata>
</package>
if (config('app.debug')) {
  dump('');
  $this->info('');
}

config('app.debug') ? info('One liner') : null;
import {Caption, Content, ErrorText, Heading, PageHeading, Subheading,} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Text/Typography/old" component={PageHeading}/>

export const Template = (args) => (
    <>
        <PageHeading {...args} />
        <Heading {...args} />
        <Subheading {...args} />
        <Content {...args} />
        <Caption {...args} />
        <ErrorText {...args} />
    </>
);

# Test

This component renders all Typography levels.

## Props

<ArgsTable story="Default"/>

## Examples

<Story name="Default" args={{text: "Example", icon: "alarm"}}>
    {Template.bind({})}
</Story>
<img alt="" src="2024/03/160224_Infinite_Elite_E_AppHeroImage_W750xH489px.jpg?$staticlink$" />
<img alt="" src="2024/03/0703_Infinite_Elite_E_AppHeroImage_W750xH489px.jpg?$staticlink$" />
<img alt="" src="2024/03/020224_New_Arrivals_E_AppHeroImage_W750xH489px.jpg?$staticlink$" />
<?php
function create_gamingguru()
{
	$labels = array(
		'name' => _x('Gaminggurus', 'Post Type General Name', 'textdomain'),
		'singular_name' => _x('Gamingguru', 'Post Type Singular Name', 'textdomain'),
		'menu_name' => _x('Gaminggurus', 'Admin Menu text', 'textdomain'),
		'name_admin_bar' => _x('Gaminggurus', 'Add New on Toolbar', 'textdomain'),
		'archives' => __('Gaminggurus Archives', 'textdomain'),
		'attributes' => __('Gaminggurus Attributes', 'textdomain'),
		'parent_item_colon' => __('Parent Gaminggurus:', 'textdomain'),
		'all_items' => __('All Gaminggurus', 'textdomain'),
		'add_new_item' => __('Add New Gamingguru', 'textdomain'),
		'add_new' => __('Add New', 'textdomain'),
		'new_item' => __('New Gamingguru', 'textdomain'),
		'edit_item' => __('Edit Gamingguru', 'textdomain'),
		'update_item' => __('Update Gamingguru', 'textdomain'),
		'view_item' => __('View Gamingguru', 'textdomain'),
		'view_items' => __('View Gaminggurus', 'textdomain'),
		'search_items' => __('Search Gaminggurus', 'textdomain'),
		'not_found' => __('Not found', 'textdomain'),
		'not_found_in_trash' => __('Not found in Trash', 'textdomain'),
		'featured_image' => __('Featured Image', 'textdomain'),
		'set_featured_image' => __('Set featured image', 'textdomain'),
		'remove_featured_image' => __('Remove featured image', 'textdomain'),
		'use_featured_image' => __('Use as featured image', 'textdomain'),
		'insert_into_item' => __('Insert into Gamingguru', 'textdomain'),
		'uploaded_to_this_item' => __('Uploaded to this Gamingguru', 'textdomain'),
		'items_list' => __('Gaminggurus list', 'textdomain'),
		'items_list_navigation' => __('Gaminggurus list navigation', 'textdomain'),
		'filter_items_list' => __('Filter Gaminggurus list', 'textdomain'),
	);

	$rewrite = array(
		'slug' => 'gamingguru',
		'with_front' => true,
		'pages' => true,
		'feeds' => true,
	);

	$args = array(
		'label' => __('Gamingguru', 'textdomain'),
		'description' => '',
		'labels' => $labels,
		'menu_icon' => 'dashicons-format-chat',
		'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'page-attributes', 'post-formats', 'custom-fields'),
		'taxonomies' => array('gamingguru_category'),
		'public' => true,
		'show_ui' => true,
		'show_in_menu' => true,
		'menu_position' => 5,
		'show_in_admin_bar' => true,
		'show_in_nav_menus' => true,
		'can_export' => true,
		'has_archive' => true,
		'hierarchical' => true,
		'exclude_from_search' => true,
		'show_in_rest' => true,
		'publicly_queryable' => true,
		'capability_type' => 'post',
		'rewrite' => $rewrite,
	);

	register_post_type('gamingguru', $args);

	register_taxonomy('gamingguru_category', 'gamingguru', array(
		'hierarchical' => true,
		'label' => 'Category',
		'query_var' => true,
		'rewrite' => array('slug' => 'gamingguru-category'),
	)
	);
}
add_action('init', 'create_gamingguru', 0);
?>
Circle.java

public class Circle{
	private double radius;
	
	public Circle(double radius){
		if(radius > 0){
			this.radius = radius;
		}
		else{
			System.out.println("Invalid radius value.Radius value must be greater than 0.");
		}
	}
	
	public double getRadius(){
		return radius;
	}
	
	public void setRadius(double radius){
		if(radius > 0){
			this.radius = radius;
		}
		else{
			System.out.println("Invalid radius value.Radius value must be greater than 0.");
		}
	}
	
	public double calculateArea(){
		return Math.PI * radius * radius;
	}
	
	public double calculatePerimeter(){
		return 2 * Math.PI * radius;
	}	
}

/////////////////////////////////////////////
////////////////////////////////////////////

TestCircle.java

public class TestCircle{
	
	public static void main(String args[]){
		
		Circle circle = new Circle(5);
		
		System.out.println("Radius: " + circle.getRadius());
		System.out.printf("Area: %.2f\n" , circle.calculateArea());
		System.out.printf("Perimeter: %.2f\n" , circle.calculatePerimeter());
		
		circle.setRadius(8);
		
		System.out.println("Updated Radius: " + circle.getRadius());
		System.out.printf("Updated Area: %.2f\n" , circle.calculateArea());
		System.out.printf("Updated Perimeter: %.2f\n" , circle.calculatePerimeter());
		
		circle.setRadius(-3);
		
		
	}
	
}
const [touchStart, setTouchStart] = useState(null)
const [touchEnd, setTouchEnd] = useState(null)

// the required distance between touchStart and touchEnd to be detected as a swipe
const minSwipeDistance = 50 

const onTouchStart = (e) => {
  setTouchEnd(null) // otherwise the swipe is fired even with usual touch events
  setTouchStart(e.targetTouches[0].clientX)
}

const onTouchMove = (e) => setTouchEnd(e.targetTouches[0].clientX)

const onTouchEnd = () => {
  if (!touchStart || !touchEnd) return
  const distance = touchStart - touchEnd
  const isLeftSwipe = distance > minSwipeDistance
  const isRightSwipe = distance < -minSwipeDistance
  if (isLeftSwipe || isRightSwipe) console.log('swipe', isLeftSwipe ? 'left' : 'right')
  // add your conditional logic here
}
#!/bin/bash
apt update
apt install -y apache2

# Get the instance ID using the instance metadata
INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)

# Install the AWS CLI
apt install -y awscli

# Download the images from S3 bucket
#aws s3 cp s3://myterraformprojectbucket2023/project.webp /var/www/html/project.png --acl public-read

# Create a simple HTML file with the portfolio content and display the images
cat <<EOF > /var/www/html/index.html
<!DOCTYPE html>
<html>
<head>
  <title>My Portfolio</title>
  <style>
    /* Add animation and styling for the text */
    @keyframes colorChange {
      0% { color: red; }
      50% { color: green; }
      100% { color: blue; }
    }
    h1 {
      animation: colorChange 2s infinite;
    }
  </style>
</head>
<body>
  <h1>Terraform Project Server 1</h1>
  <h2>Instance ID: <span style="color:green">$INSTANCE_ID</span></h2>
  <p>Welcome to Demo project using terraform </p>
  
</body>
</html>
EOF

# Start Apache and enable it on boot
systemctl start apache2
systemctl enable apache2
resource "aws_lb" "myalb" {
  name               = "myalb"
  internal           = false
  load_balancer_type = "application"
  security_groups    = [aws_security_group.sg1.id]
  subnets            = [aws_subnet.sub1.id, aws_subnet.sub2.id]
}

resource "aws_lb_target_group" "tg" {
  name     = "myTG"
  port     = 80
  protocol = "HTTP"
  vpc_id   = aws_vpc.myvpc.id

  health_check {
    path = "/"
    port = "traffic-port"
  }
}

resource "aws_lb_target_group_attachment" "attach1" {
  target_group_arn = aws_lb_target_group.tg.arn
  target_id        = aws_instance.instance-1.id
  port             = 80
}

resource "aws_lb_target_group_attachment" "attach2" {
  target_group_arn = aws_lb_target_group.tg.arn
  target_id        = aws_instance.instance-2.id
  port             = 80
}

resource "aws_lb_listener" "listener" {
  load_balancer_arn = aws_lb.myalb.arn
  port              = 80
  protocol          = "HTTP"

  default_action {
    target_group_arn = aws_lb_target_group.tg.arn
    type             = "forward"
  }


}

output "loadbalancerdns" {
  value = aws_lb.myalb.dns_name


}
resource "aws_instance" "instance-1" {
  ami                    = "ami-080e1f13689e07408"
  instance_type          = "t2.micro"
  vpc_security_group_ids = [aws_security_group.sg1.id]
  subnet_id              = aws_subnet.sub1.id
  user_data              = base64encode(file("userdata.sh"))
}

resource "aws_instance" "instance-2" {
  ami                    = "ami-080e1f13689e07408"
  instance_type          = "t2.micro"
  vpc_security_group_ids = [aws_security_group.sg1.id]
  subnet_id              = aws_subnet.sub2.id
  user_data              = base64encode(file("userdata1.sh"))
}
using System;
using System.Net.Http;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

class Program
{
  	// Async main method
    static async Task Main(string[] args)
    {
      	// Call the API and create a `Todo` object named "todo"
        Todo todo = await GetTodoAsync();

      	// Log the object's properties to the console
        Console.WriteLine($"Todo ID: {todo.Id}");
        Console.WriteLine($"Todo Title: {todo.Title}");
        Console.WriteLine($"Todo Completed: {todo.Completed}");
    }

	// Async method to get a `Todo` object
    static async Task<Todo> GetTodoAsync()
    {
      	// Create the HTTP client
        using (HttpClient client = new HttpClient())
        {
          	// Make the async GET request and save the response in "response"
            HttpResponseMessage response = await client.GetAsync("https://jsonplaceholder.typicode.com/todos/1");

          	// If we got a 200 status code
            if (response.IsSuccessStatusCode)
            {
              	// Serialize the HTTP content of the response into a C# string object named "json"
                string json = await response.Content.ReadAsStringAsync();

              	// Deserialize the "json" string into a `Todo` object named "todo"
                Todo todo = JsonSerializer.Deserialize<Todo>(json);
                return todo;
            }
            else
            {
              	// Throw an exception with a custom message that prints the bad status code
                throw new HttpRequestException($"Failed to get todo. Status code: {response.StatusCode}");
            }
        }
    }
}


// A class that represents each object in the JSON response
class Todo
{
    [JsonPropertyName("userId")]  // The field's name in the JSON response
    public int UserId { get; set; }  // How we'll refer to that property in the C# code (userId becomes UserId)

    [JsonPropertyName("id")]
    public int Id { get; set; }

    [JsonPropertyName("title")]
    public string Title { get; set; }

    [JsonPropertyName("completed")]
    public bool Completed { get; set; }
}


resource "aws_security_group" "sg1" {
  name        = "sg1"
  description = "Allow inbound rule"
  vpc_id      = aws_vpc.myvpc.id

  ingress {
    description = "allow incoming traffic to instance-1"
    from_port   = 80
    to_port     = 80
    protocol    = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }
  ingress {
    description = "allow incoming traffic to instance-1"
    from_port   = 22
    to_port     = 22
    protocol    = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }
  egress {
    from_port   = 0
    to_port     = 0
    protocol    = "-1"
    cidr_blocks = ["0.0.0.0/0"]
  }
  tags = {
    name = "sg1"
  }
}
terraform {
  backend "s3" {
    bucket = "example-demo-terra-ankey-231"
    key    = "path/vivek"
    region = "us-east-1"
  }
}
star

Mon Mar 25 2024 17:17:50 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:17:12 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:16:45 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:16:26 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:15:58 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:15:35 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:15:11 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:14:37 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:14:08 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:13:45 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:13:16 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:12:56 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:12:37 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:12:11 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:11:33 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:11:02 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:10:37 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:10:22 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:09:59 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:09:32 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:09:10 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:08:54 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:07:40 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:07:20 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:06:52 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:06:28 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:06:09 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:05:44 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:05:27 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:05:12 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:04:53 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:04:25 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:03:25 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:01:51 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 17:01:17 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 16:59:36 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 16:04:33 GMT+0000 (Coordinated Universal Time)

@Clairebear

star

Mon Mar 25 2024 14:20:35 GMT+0000 (Coordinated Universal Time)

@pdiddy81

star

Mon Mar 25 2024 14:05:14 GMT+0000 (Coordinated Universal Time)

@dustbuster #php #laravel

star

Mon Mar 25 2024 11:37:36 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Mon Mar 25 2024 09:49:00 GMT+0000 (Coordinated Universal Time)

@ayhamsss

star

Mon Mar 25 2024 08:35:48 GMT+0000 (Coordinated Universal Time)

@BilalRaza12

star

Sun Mar 24 2024 19:57:50 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #java

star

Sun Mar 24 2024 16:58:51 GMT+0000 (Coordinated Universal Time)

@joeclaap #telegram #bot #user #info #collect #store #json

star

Sun Mar 24 2024 15:59:55 GMT+0000 (Coordinated Universal Time)

@Vivekstyn

star

Sun Mar 24 2024 15:56:41 GMT+0000 (Coordinated Universal Time)

@Vivekstyn

star

Sun Mar 24 2024 15:53:01 GMT+0000 (Coordinated Universal Time)

@Vivekstyn

star

Sun Mar 24 2024 15:51:56 GMT+0000 (Coordinated Universal Time)

@aguest #c#

star

Sun Mar 24 2024 15:51:03 GMT+0000 (Coordinated Universal Time)

@Vivekstyn

star

Sun Mar 24 2024 15:48:02 GMT+0000 (Coordinated Universal Time)

@Vivekstyn

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension