UNPKG

passbolt-styleguide

Version:

Passbolt styleguide contains common styling assets used by the different sites, plugin, etc.

87 lines (81 loc) 2.35 kB
/** * Passbolt ~ Open source password manager for teams * Copyright (c) 2020 Passbolt SA (https://www.passbolt.com) * * Licensed under GNU Affero General Public License version 3 of the or any later version. * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) 2020 Passbolt SA (https://www.passbolt.com) * @license https://opensource.org/licenses/AGPL-3.0 AGPL License * @link https://www.passbolt.com Passbolt(tm) * @since 2.11.0 */ import { defaultUserDto } from "../../../../shared/models/entity/user/userEntity.test.data"; import { defaultAppContext } from "../../../contexts/ExtAppContext.test.data"; import { defaultUserWorkspaceContext } from "../../../contexts/UserWorkspaceContext.test.data"; import { defaultNavigationContext } from "../../../contexts/NavigationContext.test.data"; /** * Props with user details */ export function propsWithUserDetails() { return { context: defaultAppContext(), userWorkspaceContext: defaultUserWorkspaceContext({ details: { user: "some user", locked: true, }, isAccessAllowed: () => true, }), navigationContext: defaultNavigationContext(), }; } /** * Props with user details */ export function propsWithSelecteUser() { const user = defaultUserDto(); return { context: defaultAppContext(), userWorkspaceContext: defaultUserWorkspaceContext({ details: { user: "some user", locked: true, }, selectedUsers: [user], filteredUsers: [user], isAccessAllowed: () => true, }), navigationContext: defaultNavigationContext(), }; } /** * Props with user group details */ export function propsWithGroupDetails() { return { context: defaultAppContext(), userWorkspaceContext: defaultUserWorkspaceContext({ details: { group: "some group", locked: true, }, isAccessAllowed: () => true, }), }; } /** * Props with user details locked to false */ export function propsWithoutLock() { return { context: defaultAppContext(), userWorkspaceContext: defaultUserWorkspaceContext({ details: { locked: false, }, isAccessAllowed: () => true, }), }; }