Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- text: Draft state
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- text: Unlisted state
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions app/components/primer/beta/state.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
box-shadow: var(--boxShadow-thin) var(--borderColor-neutral-emphasis);
}

.State--unlisted {
color: var(--fgColor-muted);
background-color: var(--bgColor-muted);
border: var(--borderWidth-thin) solid var(--borderColor-default);
box-shadow: none;
}

.State--open {
color: var(--fgColor-onEmphasis);
background-color: var(--bgColor-open-emphasis, var(--color-open-emphasis));
Expand Down
4 changes: 3 additions & 1 deletion app/components/primer/beta/state.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ class State < Primer::Component
NEW_SCHEME_MAPPINGS = {
open: "State--open",
closed: "State--closed",
merged: "State--merged"
merged: "State--merged",
draft: "State--draft",
unlisted: "State--unlisted"
}.freeze

DEPRECATED_SCHEME_MAPPINGS = {
Expand Down
14 changes: 14 additions & 0 deletions previews/primer/beta/state_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ def states_merged
render(Primer::Beta::State.new(title: "Merged", scheme: :merged)) { "Merged state" }
end
#

# @label Draft
# @snapshot
def states_draft
render(Primer::Beta::State.new(title: "Draft", scheme: :draft)) { "Draft state" }
end
#

# @label Unlisted
# @snapshot
def states_unlisted
render(Primer::Beta::State.new(title: "Unlisted", scheme: :unlisted)) { "Unlisted state" }
end
#
# @!endgroup

# @!group Sizes
Expand Down