Skip to content

Visual Studio Code snippet #30

Description

@tarciozemel

Here's a VS Code snippet to facilitate the day-to-day workflow with styled-components-breakpoint.

There's 2 versions:

  • Alias break: just the "wrapper" syntax
  • Alias breakselected: wrapps on selected text

Bonus: choose the breakpoint by snippet choices. :)

{
  "styled-components-breakpoint": {
    "prefix": "break",
      "body": [
        "${breakpoint('${1|sm,md,lg,xl,xxl|}')`",
        "\t$0",
        "`}"
      ],
    "description": "Shortcut to make a styled-components-breakpoint breakpoint"
  },

  "styled-components-breakpoint selected": {
    "prefix": "breakselected",
      "body": [
        "${breakpoint('${1|sm,md,lg,xl,xxl|}')`",
        "\t$TM_SELECTED_TEXT$0",
        "`}"
      ],
    "description": "Shortcut to make a styled-components-breakpoint of selected code"
  },
}

Why no "xs" breakpoint on choices? Mobile first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions