🚧 Feedback modal UI 🚧 (#3536)
[[PR Description]] TODO: - [x] Add placeholder text to editor - [x] Add external link icon to "Community repo" button - [x] Show `not-allowed` cursor for disabled buttons - [ ] Add `Headline` ui component - [ ] Finish UI pass - [ ] Fix `IconPosition` on button (should swap the icon side) - [ ] Add conditional tooltip for disabled "Send feedback" button. - [ ] Add common/top feedback link. - [ ] Add `vw`/`vh` units to allow sizing the modal based on viewport size. Release Notes: - N/A
This commit is contained in:
commit
f4c93abad5
8 changed files with 165 additions and 130 deletions
|
@ -30,6 +30,13 @@ pub trait ButtonCommon: Clickable + Disableable {
|
|||
fn tooltip(self, tooltip: impl Fn(&mut WindowContext) -> AnyView + 'static) -> Self;
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Default)]
|
||||
pub enum IconPosition {
|
||||
#[default]
|
||||
Start,
|
||||
End,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Default)]
|
||||
pub enum ButtonStyle {
|
||||
/// A filled button with a solid background color. Provides emphasis versus
|
||||
|
@ -347,6 +354,7 @@ impl RenderOnce for ButtonLike {
|
|||
ButtonSize::None => this,
|
||||
})
|
||||
.bg(self.style.enabled(cx).background)
|
||||
.when(self.disabled, |this| this.cursor_not_allowed())
|
||||
.when(!self.disabled, |this| {
|
||||
this.cursor_pointer()
|
||||
.hover(|hover| hover.bg(self.style.hovered(cx).background))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue