mirror of
https://github.com/primer/css.git
synced 2024-09-11 16:36:07 +03:00
Spelling (code changes) (#1982)
* spelling: contains Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: func Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: itemis Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> Co-authored-by: Josh Soref <jsoref@users.noreply.github.com> Co-authored-by: Katie Langerman <langermank@github.com>
This commit is contained in:
parent
0f9c7b7fbe
commit
4d2efad7a5
@ -11,8 +11,8 @@ import {
|
||||
PatternLeadingCollapsibleTrailingVis,
|
||||
PatternSizeMedium,
|
||||
PatternSizeLarge,
|
||||
PatternConstainsSubItem,
|
||||
PatternConstainsActiveSubItem,
|
||||
PatternContainsSubItem,
|
||||
PatternContainsActiveSubItem,
|
||||
PatternTruncateText,
|
||||
PatternWrapText
|
||||
} from '../../ui-patterns/ActionList/ActionListItemCollapsibleFeatures.stories.jsx'
|
||||
@ -60,9 +60,9 @@ export const SizeMedium = ({}) => <PatternSizeMedium {...PatternSizeMedium.args}
|
||||
|
||||
export const SizeLarge = ({}) => <PatternSizeLarge {...PatternSizeLarge.args} />
|
||||
|
||||
export const ConstainsSubItem = ({}) => <PatternConstainsSubItem {...PatternConstainsSubItem.args} />
|
||||
export const ContainsSubItem = ({}) => <PatternContainsSubItem {...PatternContainsSubItem.args} />
|
||||
|
||||
export const ConstainsActiveSubItem = ({}) => <PatternConstainsActiveSubItem {...PatternConstainsActiveSubItem.args} />
|
||||
export const ContainsActiveSubItem = ({}) => <PatternContainsActiveSubItem {...PatternContainsActiveSubItem.args} />
|
||||
|
||||
export const TruncateText = ({}) => <PatternTruncateText {...PatternTruncateText.args} />
|
||||
|
||||
|
@ -258,10 +258,10 @@ export const PlaygroundTemplate = ({}) => {
|
||||
import useToggle from '../helpers/useToggle.jsx'
|
||||
|
||||
export const PlaygroundTemplate = ({}) => {
|
||||
const [isOpen, itemisOpen] = useToggle()
|
||||
const [isOpen, itemIsOpen] = useToggle()
|
||||
return (
|
||||
<>
|
||||
<details class="details-overlay" onClick={isOpen} open={itemisOpen}>
|
||||
<details class="details-overlay" onClick={isOpen} open={itemIsOpen}>
|
||||
<summary class="btn">More</summary>
|
||||
<div class="border p-3 mt-2">Hidden text</div>
|
||||
</details>
|
||||
@ -279,10 +279,10 @@ Toggle any HTML attribute, like `aria-etc`, `checked`, `hidden`, etc.
|
||||
import useToggle from '../helpers/useToggle.jsx'
|
||||
|
||||
export const PlaygroundTemplate = ({}) => {
|
||||
const [isDisabled, itemisDisabled] = useToggle()
|
||||
const [isDisabled, itemIsDisabled] = useToggle()
|
||||
return (
|
||||
<>
|
||||
<button onClick={itemisDisabled} class="btn d-block mb-2">
|
||||
<button onClick={itemIsDisabled} class="btn d-block mb-2">
|
||||
Toggle
|
||||
</button>
|
||||
<button disabled={isDisabled}>{isDisabled ? 'disabled' : 'button'}</button>
|
||||
@ -300,10 +300,10 @@ Toggle any CSS class to show interaction and/or animation
|
||||
import useToggle from '../helpers/useToggle.jsx'
|
||||
|
||||
export const PlaygroundTemplate = ({}) => {
|
||||
const [isRotating, itemisRotating] = useToggle()
|
||||
const [isRotating, itemIsRotating] = useToggle()
|
||||
return (
|
||||
<>
|
||||
<button onClick={itemisRotating} class="btn d-block mb-2">
|
||||
<button onClick={itemIsRotating} class="btn d-block mb-2">
|
||||
Toggle
|
||||
</button>
|
||||
<svg
|
||||
|
@ -118,18 +118,18 @@ PatternSizeLarge.args = {
|
||||
collapsePosition: 1
|
||||
}
|
||||
|
||||
export const PatternConstainsSubItem = ActionListItemCollapsibleTemplate.bind({})
|
||||
PatternConstainsSubItem.storyName = 'Has sub item (render css class)'
|
||||
PatternConstainsSubItem.args = {
|
||||
export const PatternContainsSubItem = ActionListItemCollapsibleTemplate.bind({})
|
||||
PatternContainsSubItem.storyName = 'Has sub item (render css class)'
|
||||
PatternContainsSubItem.args = {
|
||||
...ActionListItemCollapsibleTemplate.args,
|
||||
text: 'I am collapsible',
|
||||
collapsePosition: 1,
|
||||
containsSubItem: true
|
||||
}
|
||||
|
||||
export const PatternConstainsActiveSubItem = ActionListItemCollapsibleTemplate.bind({})
|
||||
PatternConstainsActiveSubItem.storyName = 'Has active sub item'
|
||||
PatternConstainsActiveSubItem.args = {
|
||||
export const PatternContainsActiveSubItem = ActionListItemCollapsibleTemplate.bind({})
|
||||
PatternContainsActiveSubItem.storyName = 'Has active sub item'
|
||||
PatternContainsActiveSubItem.args = {
|
||||
...ActionListItemCollapsibleTemplate.args,
|
||||
text: 'I have an active child',
|
||||
collapsePosition: 1,
|
||||
|
@ -43,9 +43,9 @@ async function analyzeVariables(fileName) {
|
||||
|
||||
function checkNode(node) {
|
||||
const allowedFuncts = ['var', 'round', 'cubic-bezier']
|
||||
const functMatch = node.value.match(/([^\s]*)\(/)
|
||||
const funcMatch = node.value.match(/([^\s]*)\(/)
|
||||
let approvedMatch = true
|
||||
if (functMatch && !allowedFuncts.includes(functMatch[1])) {
|
||||
if (funcMatch && !allowedFuncts.includes(funcMatch[1])) {
|
||||
approvedMatch = false
|
||||
}
|
||||
return node.variable && approvedMatch
|
||||
|
Loading…
Reference in New Issue
Block a user