Create Theme v2 and define colors in palette

This commit is contained in:
ismailgulek
2021-04-30 15:59:24 +03:00
parent 39af2c6401
commit 0a7ad8d762
4 changed files with 191 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import Foundation
import UIKit
/// Colors at https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound?node-id=1255%3A1104
@objc public protocol Colors {
var accent: UIColor { get }
var alert: UIColor { get }
var primaryContent: UIColor { get }
var secondaryContent: UIColor { get }
var tertiaryContent: UIColor { get }
var quarterlyContent: UIColor { get }
var separator: UIColor { get }
var toast: UIColor { get }
var tile: UIColor { get }
var navigation: UIColor { get }
var background: UIColor { get }
var namesAndAvatars: [UIColor] { get }
}
+28
View File
@@ -0,0 +1,28 @@
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import Foundation
import UIKit
/// Theme v2. May be named again as `Theme` when the migration completed.
@objc public protocol ThemeV2 {
/// Colors object
var colors: Colors { get }
/// may contain more design components in future, like icons, audio files etc.
}