new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

GitHub Primer · all subjects

button

8 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Button component deprecated in @primer/react

The Button component in @primer/react is deprecated. Users should use the new Button component instead.

Button component usage for actions vs Link for destinations

Button is used for actions, like in forms, while Link is used for destinations or moving from one page to another.

Button as anchor tag with href

In special cases where you would like to use an anchor tag styled like a Button, use Button with as='a' prop and provide an href attribute.

ButtonGroup for grouping buttons

To create a button group, wrap Button elements in the ButtonGroup element. ButtonGroup accepts the same props as Box.

Button component props

The Button component accepts the following props in addition to native HTML button attributes: - as: String, default 'button', sets the HTML tag for the component - sx: SystemStyleObject, default {}, additional styles - variant: String, default 'medium', accepts values 'small', 'medium', or 'large' to adjust button text size; has no effect if fontSize prop is set

Button variants in deprecated component

The deprecated Button component includes the following variants: Button (default), ButtonDanger, ButtonOutline, ButtonPrimary, ButtonInvisible, ButtonClose, and ButtonTableList.

macOS button order on Desktop

On macOS in GitHub Desktop, the secondary button is always on the left (whether default or cancel) and the primary action is on the right. This is aligned with Primer guidelines used on github.com. Example: 'Cancel | Let's Do This'.

Windows button order on Desktop

On Windows in GitHub Desktop, the default button is always on the far right and the primary action is on the left. This differs from Primer guidelines. Example: 'Let's do this | Cancel'.

Give your agent this brain