Button2 – Part1 (#3420)

## TODO

- [x] Remove `InteractionState`
- [ ] `Selectable` should use `Selection` instead of a boolean
- [x] Clean out ui2 prelude
- [ ] Build out button2 button types
- [ ] Port old buttons

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
This commit is contained in:
Nate Butler 2023-11-29 12:23:09 -05:00 committed by GitHub
parent 5d59108b97
commit a8bf0834e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 567 additions and 339 deletions

View file

@ -2,7 +2,7 @@ use gpui::{
actions, div, prelude::*, Div, FocusHandle, Focusable, KeyBinding, Render, Stateful, View,
WindowContext,
};
use theme2::ActiveTheme;
use ui::prelude::*;
actions!(ActionA, ActionB, ActionC);

View file

@ -4,7 +4,7 @@ use gpui::{
};
use picker::{Picker, PickerDelegate};
use std::sync::Arc;
use theme2::ActiveTheme;
use ui::prelude::*;
use ui::{Label, ListItem};
pub struct PickerStory {

View file

@ -1,5 +1,5 @@
use gpui::{div, prelude::*, px, Div, Render, SharedString, Stateful, Styled, View, WindowContext};
use theme2::ActiveTheme;
use ui::prelude::*;
use ui::Tooltip;
pub struct ScrollStory;

View file

@ -19,7 +19,6 @@ pub enum ComponentStory {
Focus,
Icon,
IconButton,
Input,
Keybinding,
Label,
ListItem,
@ -39,7 +38,6 @@ impl ComponentStory {
Self::Focus => FocusStory::view(cx).into(),
Self::Icon => cx.build_view(|_| ui::IconStory).into(),
Self::IconButton => cx.build_view(|_| ui::IconButtonStory).into(),
Self::Input => cx.build_view(|_| ui::InputStory).into(),
Self::Keybinding => cx.build_view(|_| ui::KeybindingStory).into(),
Self::Label => cx.build_view(|_| ui::LabelStory).into(),
Self::ListItem => cx.build_view(|_| ui::ListItemStory).into(),