We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
userInterfaceStyle: "dark" doesn't work for iOS.
Styling code is as this:
const ShowActionSheetButton = ({ imageUrl, withTitle = false, withMessage = false, withIcons = false, withSeparators = false, withCancelButtonTintColor = false, useModal = false, onClose, }) => { const anchorRef = useRef(null); const { showActionSheetWithOptions } = useActionSheet();
const showActionSheet = () => { const options = ["Save", "Share", "Cancel"]; const icons = withIcons ? [icon("save"), icon("share"), icon("cancel")] : undefined; const titleOption = withTitle ? "Choose An Action" : undefined; const messageOption = withMessage ? "This library tries to mimic the native share sheets as close as possible." : undefined; const containerStyle = {backgroundColor: "black"}; const tintColor = "white"; showActionSheetWithOptions( { options, icons, title: titleOption, message: messageOption, userInterfaceStyle: "dark", //Here is setting the interface, but it doesn't work containerStyle, tintColor, cancelButtonIndex: 2, showSeparators: withSeparators, cancelButtonTintColor: withCancelButtonTintColor ? "#D93F0B" : undefined, useModal, }, ); };
useEffect(() => { if (imageUrl) { showActionSheet(); } }, [imageUrl]); };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
userInterfaceStyle: "dark" doesn't work for iOS.
Styling code is as this:
const ShowActionSheetButton = ({
imageUrl,
withTitle = false,
withMessage = false,
withIcons = false,
withSeparators = false,
withCancelButtonTintColor = false,
useModal = false,
onClose,
}) => {
const anchorRef = useRef(null);
const { showActionSheetWithOptions } = useActionSheet();
const showActionSheet = () => {
const options = ["Save", "Share", "Cancel"];
const icons = withIcons
? [icon("save"), icon("share"), icon("cancel")]
: undefined;
const titleOption = withTitle ? "Choose An Action" : undefined;
const messageOption = withMessage
? "This library tries to mimic the native share sheets as close as possible."
: undefined;
const containerStyle = {backgroundColor: "black"};
const tintColor = "white";
showActionSheetWithOptions(
{
options,
icons,
title: titleOption,
message: messageOption,
userInterfaceStyle: "dark", //Here is setting the interface, but it doesn't work
containerStyle,
tintColor,
cancelButtonIndex: 2,
showSeparators: withSeparators,
cancelButtonTintColor: withCancelButtonTintColor
? "#D93F0B"
: undefined,
useModal,
},
);
};
useEffect(() => {
if (imageUrl) {
showActionSheet();
}
}, [imageUrl]);
};
The text was updated successfully, but these errors were encountered: