Skip to content
Snippets Groups Projects
Unverified Commit 3a38c32b authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

:bug: (modals) allow content to be vertically scrollable (#3161)

* :bug: (modals) allow content to be vertically scrollable

Closes #3079

* Feedback: overfloww auto

* fix modal scrollbar style

* dont need to spread

* lint :disappointed:



* Update 3161.md

* adding width 100% to inputwithcontent

---------

Co-authored-by: default avatarMichael Clark <5285928+MikesGlitch@users.noreply.github.com>
parent c3c6acd3
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,7 @@ export function InputWithContent({ ...@@ -44,6 +44,7 @@ export function InputWithContent({
{...props} {...props}
focused={focused} focused={focused}
style={{ style={{
width: '100%',
...inputStyle, ...inputStyle,
flex: 1, flex: 1,
'&, &:focus, &:hover': { '&, &:focus, &:hover': {
......
...@@ -15,6 +15,7 @@ import { ...@@ -15,6 +15,7 @@ import {
import { useHotkeysContext } from 'react-hotkeys-hook'; import { useHotkeysContext } from 'react-hotkeys-hook';
import { AutoTextSize } from 'auto-text-size'; import { AutoTextSize } from 'auto-text-size';
import { css } from 'glamor';
import { useModalState } from '../../hooks/useModalState'; import { useModalState } from '../../hooks/useModalState';
import { AnimatedLoading } from '../../icons/AnimatedLoading'; import { AnimatedLoading } from '../../icons/AnimatedLoading';
...@@ -89,6 +90,7 @@ export const Modal = ({ ...@@ -89,6 +90,7 @@ export const Modal = ({
{modalProps => ( {modalProps => (
<Dialog <Dialog
aria-label="Modal dialog" aria-label="Modal dialog"
className={`${css(styles.lightScrollbar)}`}
style={{ style={{
outline: 'none', // remove focus outline outline: 'none', // remove focus outline
}} }}
...@@ -113,12 +115,12 @@ export const Modal = ({ ...@@ -113,12 +115,12 @@ export const Modal = ({
[`@media (min-width: ${tokens.breakpoint_small})`]: { [`@media (min-width: ${tokens.breakpoint_small})`]: {
minWidth: tokens.breakpoint_small, minWidth: tokens.breakpoint_small,
}, },
overflowY: 'auto',
...styles.shadowLarge, ...styles.shadowLarge,
...styles.lightScrollbar,
...containerProps?.style, ...containerProps?.style,
}} }}
> >
<View style={{ paddingTop: 0, flex: 1 }}> <View style={{ paddingTop: 0, flex: 1, flexShrink: 0 }}>
{typeof children === 'function' {typeof children === 'function'
? children(modalProps) ? children(modalProps)
: children} : children}
......
---
category: Bugfix
authors: [MatissJanis, MikesGlitch]
---
Allow modal content to be vertically scrollable.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment